summaryrefslogtreecommitdiff
path: root/src/lapi.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lapi.js')
-rw-r--r--src/lapi.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lapi.js b/src/lapi.js
index f7ef82e..efc59aa 100644
--- a/src/lapi.js
+++ b/src/lapi.js
@@ -671,9 +671,9 @@ const lua_tolstring = function(L, idx) {
if (!lvm.cvt2str(o)) { /* not convertible? */
return null;
}
+ o = lobject.luaO_tostring(L, o);
}
-
- return o.ttisstring() ? o.svalue() : defs.to_luastring(`${o.value}`);
+ return o.svalue();
};
const lua_tostring = lua_tolstring;
@@ -685,9 +685,9 @@ const lua_toljsstring = function(L, idx) {
if (!lvm.cvt2str(o)) { /* not convertible? */
return null;
}
+ o = lobject.luaO_tostring(L, o);
}
-
- return o.ttisstring() ? o.jsstring() : `${o.value}`;
+ return o.jsstring();
};
const lua_tojsstring = lua_toljsstring;