diff options
author | daurnimator <quae@daurnimator.com> | 2017-12-10 01:01:43 +1100 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-12-10 01:07:58 +1100 |
commit | 382bfe27205d5ade172fa088fcab0b2e123838e4 (patch) | |
tree | 394e24f93123e3efe75c8ef0d56007e8934e1c53 /src/ldblib.js | |
parent | 4d8bd2b823eddada773a84e4004c380cf7de8762 (diff) | |
download | fengari-382bfe27205d5ade172fa088fcab0b2e123838e4.tar.gz fengari-382bfe27205d5ade172fa088fcab0b2e123838e4.tar.bz2 fengari-382bfe27205d5ade172fa088fcab0b2e123838e4.zip |
Use `typeof process === "undefined"` instead of WEB global
This removes requirement to set global.WEB before requiring in node
Diffstat (limited to 'src/ldblib.js')
-rw-r--r-- | src/ldblib.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ldblib.js b/src/ldblib.js index 2faa9f0..5912b5a 100644 --- a/src/ldblib.js +++ b/src/ldblib.js @@ -395,8 +395,7 @@ const dblib = { "upvaluejoin": db_upvaluejoin }; -// Only with Node -if (!WEB) { +if (typeof process !== "undefined") { // Only with Node const readlineSync = require('readline-sync'); readlineSync.setDefaultOptions({ prompt: 'lua_debug> ' |