Skip to content

Commit 6127f73

Browse files
committed
Use 'var' for ENVIRONMENT_IS_PTHREAD in src/shell.js.
1 parent fb12928 commit 6127f73

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/shell.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ var ENVIRONMENT_IS_WEB = typeof window === 'object';
4242
// 3) We could be an application pthread running in a worker. (ENVIRONMENT_IS_WORKER == true and ENVIRONMENT_IS_PTHREAD == true)
4343
var ENVIRONMENT_IS_WORKER = typeof importScripts === 'function';
4444
#if USE_PTHREADS
45-
if (typeof ENVIRONMENT_IS_PTHREAD === 'undefined') ENVIRONMENT_IS_PTHREAD = false; // ENVIRONMENT_IS_PTHREAD=true will have been preset in pthread-main.js.
45+
var ENVIRONMENT_IS_PTHREAD;
46+
if (!ENVIRONMENT_IS_PTHREAD) ENVIRONMENT_IS_PTHREAD = false; // ENVIRONMENT_IS_PTHREAD=true will have been preset in pthread-main.js. Make it false in the main runtime thread.
4647
#endif
4748
var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;
4849

0 commit comments

Comments
 (0)