summaryrefslogtreecommitdiff
path: root/src/lapi.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-03-21 08:38:41 +0100
committerBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-03-21 09:03:37 +0100
commit66292a6a85cf22cae31520ea4d08c76f544e338a (patch)
tree3a0c53434a4008359d8d7c9f4bffc93f32b7a9c4 /src/lapi.js
parent2cc93b924a21030fcd6f5dc96f287bbf13f987f4 (diff)
downloadfengari-66292a6a85cf22cae31520ea4d08c76f544e338a.tar.gz
fengari-66292a6a85cf22cae31520ea4d08c76f544e338a.tar.bz2
fengari-66292a6a85cf22cae31520ea4d08c76f544e338a.zip
string.gsub tests
Diffstat (limited to 'src/lapi.js')
-rw-r--r--src/lapi.js2
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}`;