aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-08-18 10:53:56 +1000
committerdaurnimator <quae@daurnimator.com>2017-08-18 10:53:56 +1000
commit7ebe292cc79f580246d365cd0da93f80294b48f0 (patch)
treeafa3525cc03743133230197019f760507aa50630 /src
parent1c9d5cce74d26d1bfbf24f270f8e92c70cfa0b28 (diff)
downloadfengari-7ebe292cc79f580246d365cd0da93f80294b48f0.tar.gz
fengari-7ebe292cc79f580246d365cd0da93f80294b48f0.tar.bz2
fengari-7ebe292cc79f580246d365cd0da93f80294b48f0.zip
src/lauxlib.js: Don't index possibly missing global 'process'
Diffstat (limited to 'src')
-rw-r--r--src/lauxlib.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lauxlib.js b/src/lauxlib.js
index 9a6666a..68a975d 100644
--- a/src/lauxlib.js
+++ b/src/lauxlib.js
@@ -846,11 +846,13 @@ const luaL_dofile = function(L, filename) {
};
const lua_writestringerror = function(s) {
- if (process.stderr) process.stderr.write(s);
- else console.error(s);
+ if (WEB) {
+ process.stderr.write(s);
+ } else {
+ console.error(s);
+ }
};
-
const luaL_checkversion = function(L) {
let ver = lua.LUA_VERSION_NUM;
let sz = LUAL_NUMSIZES;