You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The check for `require` was being applied even in the case that it
wasn't needed.
The check for node, when running under the shell environment was out of
date with the node check that we use to define ENVIRONMENT_IS_NODE and
should not have been checking for require (which is not always present
under node these days).
Fixes: #15022
Copy file name to clipboardExpand all lines: src/shell.js
+12-8Lines changed: 12 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -158,12 +158,12 @@ var nodeFS;
158
158
varnodePath;
159
159
160
160
if(ENVIRONMENT_IS_NODE){
161
-
#if ENVIRONMENT
161
+
if(ENVIRONMENT_IS_WORKER){
162
162
#if ASSERTIONS
163
-
if(!(typeofprocess=== 'object' &&typeofrequire=== 'function'))thrownewError('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)');
0 commit comments