This commit is contained in:
Dmitry Vasilev
2022-11-28 22:02:37 +08:00
parent ffec3e3cc2
commit 3dece8f407
4 changed files with 29 additions and 20 deletions

View File

@@ -58,8 +58,8 @@ type Node = ToplevelCall | Call
// TODO just export const Iframe_Function?
const make_function = (...args) => {
if(globalThis.run_window == null) {
// Tests are run in Node.js or user have not opened run_window
if(globalThis.process != null) {
// Tests are run in Node.js
return new Function(...args)
} else {
// Code run in browser and user opened run_window