summaryrefslogtreecommitdiff
path: root/src/lualib.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-12-10 01:01:43 +1100
committerdaurnimator <quae@daurnimator.com>2017-12-10 01:07:58 +1100
commit382bfe27205d5ade172fa088fcab0b2e123838e4 (patch)
tree394e24f93123e3efe75c8ef0d56007e8934e1c53 /src/lualib.js
parent4d8bd2b823eddada773a84e4004c380cf7de8762 (diff)
downloadfengari-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/lualib.js')
-rw-r--r--src/lualib.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lualib.js b/src/lualib.js
index 50ca433..4fbae44 100644
--- a/src/lualib.js
+++ b/src/lualib.js
@@ -14,7 +14,7 @@ const LUA_TABLIBNAME = "table";
module.exports.LUA_TABLIBNAME = LUA_TABLIBNAME;
module.exports.luaopen_table = require("./ltablib.js").luaopen_table;
-if (!WEB) {
+if (typeof process !== "undefined") {
const LUA_IOLIBNAME = "io";
module.exports.LUA_IOLIBNAME = LUA_IOLIBNAME;
module.exports.luaopen_io = require("./liolib.js").luaopen_io;