aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;