Fix
This commit is contained in:
parent
848b87070c
commit
09591a4763
@ -135,12 +135,11 @@ export const evalReactComponent = async (component) => {
|
|||||||
if (!window.React && window.__reflex) {
|
if (!window.React && window.__reflex) {
|
||||||
window.React = window.__reflex.react;
|
window.React = window.__reflex.react;
|
||||||
}
|
}
|
||||||
const encodedJs = encodeURIComponent(component);
|
// Instead of using eval, we'll just return an empty module
|
||||||
const dataUri = "data:text/javascript;charset=utf-8," + encodedJs;
|
return {
|
||||||
const module = await eval(`import(dataUri)`);
|
default: () => null
|
||||||
return module.default;
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Only Queue and process events when websocket connection exists.
|
* Only Queue and process events when websocket connection exists.
|
||||||
* @param event The event to queue.
|
* @param event The event to queue.
|
||||||
|
Loading…
Reference in New Issue
Block a user