diff options
Diffstat (limited to 'src/ldebug.js')
-rw-r--r-- | src/ldebug.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ldebug.js b/src/ldebug.js index 529cb0c..3b01263 100644 --- a/src/ldebug.js +++ b/src/ldebug.js @@ -431,7 +431,14 @@ const varinfo = function(L, o) { kind = getobjname(ci.func.p, ci.pcOff, stkid - ci.u.l.base); } - return kind ? ` (${kind.funcname} '${kind.name.jsstring()}')` : ``; + if (kind) { + let funcname = kind.funcname instanceof TValue ? kind.funcname.jsstring() : kind.funcname; + let name = kind.name instanceof TValue ? kind.name.jsstring() : kind.name; + + return ` (${funcname} '${name}')`; + } + + return ``; }; const luaG_typeerror = function(L, o, op) { |