From 6b2ed28d55a0bf71edf3fe872af7e304d58a2dd5 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Wed, 15 May 2019 07:21:25 +0100 Subject: [PATCH] Workaround "move not found" exception in JS when using tables. (#11256) --- lib/pure/collections/tables.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/pure/collections/tables.nim b/lib/pure/collections/tables.nim index 93ccb40580..84284edb39 100644 --- a/lib/pure/collections/tables.nim +++ b/lib/pure/collections/tables.nim @@ -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)