summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ltable.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ltable.js b/src/ltable.js
index a06e5d8..e4d21e2 100644
--- a/src/ltable.js
+++ b/src/ltable.js
@@ -187,7 +187,7 @@ const luaH_next = function(L, table, keyI) {
return false;
} else {
/* Try dead keys */
- entry = table.dead_weak.get(hash) || table.dead_strong.get(hash);
+ entry = (table.dead_weak && table.dead_weak.get(hash)) || table.dead_strong.get(hash);
if (!entry)
/* item not in table */
return ldebug.luaG_runerror(L, defs.to_luastring("invalid key to 'next'"));