aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lapi.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lapi.js b/src/lapi.js
index c4e1029..35f8d21 100644
--- a/src/lapi.js
+++ b/src/lapi.js
@@ -808,7 +808,7 @@ const lua_load = function(L, reader, data, chunckname, mode) {
let reg = L.l_G.l_registry;
let gt = reg.value.get(lua.LUA_RIDX_GLOBALS);
/* set global table as 1st upvalue of 'f' (may be LUA_ENV) */
- f.upvals[0].u.value = gt;
+ f.upvals[0].u.value = new TValue(gt.type, gt.value);
}
}
return status;