From 382bfe27205d5ade172fa088fcab0b2e123838e4 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Sun, 10 Dec 2017 01:01:43 +1100 Subject: Use `typeof process === "undefined"` instead of WEB global This removes requirement to set global.WEB before requiring in node --- src/lualib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lualib.js') 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; -- cgit v1.2.3-54-g00ecf