diff options
author | daurnimator <quae@daurnimator.com> | 2017-08-18 10:53:56 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-08-18 10:53:56 +1000 |
commit | 7ebe292cc79f580246d365cd0da93f80294b48f0 (patch) | |
tree | afa3525cc03743133230197019f760507aa50630 /src/lauxlib.js | |
parent | 1c9d5cce74d26d1bfbf24f270f8e92c70cfa0b28 (diff) | |
download | fengari-7ebe292cc79f580246d365cd0da93f80294b48f0.tar.gz fengari-7ebe292cc79f580246d365cd0da93f80294b48f0.tar.bz2 fengari-7ebe292cc79f580246d365cd0da93f80294b48f0.zip |
src/lauxlib.js: Don't index possibly missing global 'process'
Diffstat (limited to 'src/lauxlib.js')
-rw-r--r-- | src/lauxlib.js | 8 |
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; |