summaryrefslogtreecommitdiff
path: root/src/lfunc.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lfunc.js')
-rw-r--r--src/lfunc.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lfunc.js b/src/lfunc.js
index e038cc0..544b87c 100644
--- a/src/lfunc.js
+++ b/src/lfunc.js
@@ -29,6 +29,7 @@ class UpVal {
constructor(L) {
this.L = L; // Keep track of the thread it comes from
this.v = null; /* if null, upval is closed, value is in u.value */
+ this.refcount = 0;
this.u = {
open: { /* (when open) */
next: null, /* linked list */
@@ -74,7 +75,6 @@ const findupval = function(L, level) {
}
let uv = new UpVal(L);
- uv.refcount = 0;
uv.u.open.next = pp;
uv.u.open.touched = true;