diff options
-rw-r--r-- | src/lapi.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lapi.js b/src/lapi.js index ae9fa89..44ed1ad 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -567,11 +567,8 @@ const lua_setupvalue = function(L, funcindex, n) { if (aux) { let name = aux.name; let val = aux.val; - L.top--; - val.type = L.stack[L.top].type; - val.value = L.stack[L.top].value; - + val.setfrom(L.stack[L.top]); return name; } return null; |