diff options
Diffstat (limited to 'src/lapi.js')
-rw-r--r-- | src/lapi.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lapi.js b/src/lapi.js index 6840ef9..5872545 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -542,7 +542,7 @@ const lua_toboolean = function(L, idx) { const lua_tolstring = function(L, idx) { let o = index2addr(L, idx); - if (!o.ttisstring() && !o.ttisnumber()) + if ((!o.ttisstring() && !o.ttisnumber())) return null; return o.ttisstring() ? o.jsstring() : `${o.value}`; |