summaryrefslogtreecommitdiff
path: root/src/ldblib.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ldblib.js')
-rw-r--r--src/ldblib.js19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/ldblib.js b/src/ldblib.js
index 2faa9f0..96db3c7 100644
--- a/src/ldblib.js
+++ b/src/ldblib.js
@@ -46,11 +46,11 @@ const db_getuservalue = function(L) {
const db_setuservalue = function(L) {
- lauxlib.luaL_checktype(L, 1, lua.LUA_TUSERDATA);
- lauxlib.luaL_checkany(L, 2);
- lua.lua_settop(L, 2);
- lua.lua_setuservalue(L, 1);
- return 1;
+ lauxlib.luaL_checktype(L, 1, lua.LUA_TUSERDATA);
+ lauxlib.luaL_checkany(L, 2);
+ lua.lua_settop(L, 2);
+ lua.lua_setuservalue(L, 1);
+ return 1;
};
/*
@@ -247,9 +247,9 @@ const checkupval = function(L, argf, argnup) {
};
const db_upvalueid = function(L) {
- let n = checkupval(L, 1, 2);
- lua.lua_pushlightuserdata(L, lua.lua_upvalueid(L, 1, n));
- return 1;
+ let n = checkupval(L, 1, 2);
+ lua.lua_pushlightuserdata(L, lua.lua_upvalueid(L, 1, n));
+ return 1;
};
const db_upvaluejoin = function(L) {
@@ -395,8 +395,7 @@ const dblib = {
"upvaluejoin": db_upvaluejoin
};
-// Only with Node
-if (!WEB) {
+if (typeof process !== "undefined") { // Only with Node
const readlineSync = require('readline-sync');
readlineSync.setDefaultOptions({
prompt: 'lua_debug> '