Workaround "move not found" exception in JS when using tables. (#11256)

This commit is contained in:
Dominik Picheta
2019-05-15 07:21:25 +01:00
committed by Andreas Rumpf
parent 95f8ed0382
commit 6b2ed28d55

View File

@@ -274,7 +274,10 @@ proc enlarge[A, B](t: var Table[A, B]) =
var j: Hash = eh and maxHash(t)
while isFilled(t.data[j].hcode):
j = nextTry(j, maxHash(t))
rawInsert(t, t.data, move n[i].key, move n[i].val, eh, j)
when defined(js):
rawInsert(t, t.data, n[i].key, n[i].val, eh, j)
else:
rawInsert(t, t.data, move n[i].key, move n[i].val, eh, j)