Skip to content

Commit 45c6371

Browse files
committed
- fix bug: incorrect variable used in checking consumed.
1 parent ea8202b commit 45c6371

File tree

6 files changed

+12
-7
lines changed

6 files changed

+12
-7
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
- remove `setContext()` and `setCtx()`, in favor of `ctx()`.
88

99

10+
## v1.4.2 (upcoming)
11+
12+
- fix bug: incorrect variable used in checking `consumed`.
13+
14+
1015
## v1.4.1
1116

1217
- fix bug: duplicated keys in `ld-each` `list` may leave orphan nodes undeleted.

dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,8 @@
319319
ns.splice(0, 0, node);
320320
continue;
321321
}
322-
if (usekey && typeof key !== 'object') {
323-
if (consumed[key] > 1) {
322+
if (usekey && typeof k !== 'object') {
323+
if (consumed[k] > 1) {
324324
continue;
325325
}
326326
}

dist/index.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ldview.ls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ ldview.prototype = Object.create(Object.prototype) <<< do
192192
ns.splice 0, 0, node
193193
continue
194194
# this can prevent dup key from creating new node.
195-
if usekey and (typeof(key) != \object) => if consumed[key] > 1 => continue
195+
if usekey and (typeof(k) != \object) => if consumed[k] > 1 => continue
196196
node = data.node.cloneNode true
197197
node._data = n
198198
node._obj = {node, name, data: n, idx: i, local: {}}

web/static/assets/lib/ldview/dev/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,8 @@
319319
ns.splice(0, 0, node);
320320
continue;
321321
}
322-
if (usekey && typeof key !== 'object') {
323-
if (consumed[key] > 1) {
322+
if (usekey && typeof k !== 'object') {
323+
if (consumed[k] > 1) {
324324
continue;
325325
}
326326
}

0 commit comments

Comments
 (0)