diff options
author | Dominik Picheta <dominikpicheta@googlemail.com> | 2019-05-15 07:21:25 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-05-15 08:21:25 +0200 |
commit | 6b2ed28d55a0bf71edf3fe872af7e304d58a2dd5 (patch) | |
tree | 65c4e61c64d9bb0bcf4eef1f525d27506ed193c3 | |
parent | 95f8ed03821be6725b22e52de47c3efc413af908 (diff) | |
download | Nim-6b2ed28d55a0bf71edf3fe872af7e304d58a2dd5.tar.gz |
Workaround "move not found" exception in JS when using tables. (#11256)
-rw-r--r-- | lib/pure/collections/tables.nim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/pure/collections/tables.nim b/lib/pure/collections/tables.nim index 93ccb4058..84284edb3 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) |