Commit 2137c1205c6d9510c9a30abd13c5d3765a7e32d8
dict-to-collection: fix updating of keys
Matt McKegg committed on 9/21/2016, 12:12:49 PMParent: 6d3b3f5d04175fa2974bdd753f0f5ae53a01e924
Files changed
dict-to-collection.js | changed |
dict-to-collection.js | ||
---|---|---|
@@ -15,8 +15,11 @@ | ||
15 | 15 | for (var i = 0; i < length; i++) { |
16 | 16 | var key = keys[i] |
17 | 17 | var item = obs.get(key) |
18 | 18 | if (shouldUpdate(item, raw[i])) { |
19 | + if (raw[i].key() !== key) { | |
20 | + raw[i].key.set(key) | |
21 | + } | |
19 | 22 | if (raw[i].value !== item) { |
20 | 23 | raw[i].value.set(item) |
21 | 24 | } |
22 | 25 | } else { |
Built with git-ssb-web