summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lvm.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lvm.js b/src/lvm.js
index e796e4e..07acb42 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -155,7 +155,7 @@ const luaV_execute = function(L) {
}
case OCi.OP_SETUPVAL: {
let uv = cl.upvals[i.B];
- if (uv.v !== null) {
+ if (uv.isopen()) {
uv.L.stack[uv.v] = L.stack[ra];
} else {
uv.value.setfrom(L.stack[ra]);