summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-03-22 13:42:23 +0100
committerAndreas Rumpf <rumpf_a@web.de>2016-03-22 13:42:23 +0100
commit709b0aeb8d816322404ddd56ec2edfef80641742 (patch)
treee27b1f64825da431dd0c8f1cccd8b626624a4e33 /lib
parent4457b0980fc974efae25c539bad98b9b971299db (diff)
parent308b7c01381daa347558d3965510c73e3adebb5f (diff)
downloadNim-709b0aeb8d816322404ddd56ec2edfef80641742.tar.gz
Merge pull request #3990 from yglukhov/js-tables-fix
Fixed Table::del in JS
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/collections/tableimpl.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/pure/collections/tableimpl.nim b/lib/pure/collections/tableimpl.nim
index beafe1109..e4ec05b1c 100644
--- a/lib/pure/collections/tableimpl.nim
+++ b/lib/pure/collections/tableimpl.nim
@@ -129,4 +129,7 @@ template delImpl() {.dirty, immediate.} =
           r = t.data[i].hcode and msk    # "home" location of key@i
           if not ((i >= r and r > j) or (r > j and j > i) or (j > i and i >= r)):
             break
-        shallowCopy(t.data[j], t.data[i]) # data[j] will be marked EMPTY next loop
+        when defined(js):
+          t.data[j] = t.data[i]
+        else:
+          shallowCopy(t.data[j], t.data[i]) # data[j] will be marked EMPTY next loop