Skip to content

Commit c573ceb

Browse files
Respect keys everywhere
Attempt to fix MithrilJS#1713, superseding MithrilJS#1720, as per @pygy's insight here MithrilJS#1720 (comment)
1 parent 683d85a commit c573ceb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

render/render.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ module.exports = function($window) {
233233
}
234234
function updateNode(parent, old, vnode, hooks, nextSibling, recycling, ns) {
235235
var oldTag = old.tag, tag = vnode.tag
236-
if (oldTag === tag) {
236+
if (oldTag === tag && vnode.key === old.key) {
237237
vnode.state = old.state
238238
vnode.events = old.events
239239
if (!recycling && shouldNotUpdate(vnode, old)) return

0 commit comments

Comments
 (0)