Skip to content

Commit f8abfa9

Browse files
committed
ensure that DOMPatcher knows about the right snabb element
1 parent 522c8fc commit f8abfa9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/dom-patcher.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export class DOMPatcher {
5656
insertHook(this.vnode);
5757
}
5858
}
59+
this.el = this.vnode.elm;
5960
}
6061

6162
update(newState) {
@@ -91,6 +92,7 @@ export class DOMPatcher {
9192

9293
patch(this.vnode, newVnode);
9394
this.vnode = newVnode;
95+
this.el = this.vnode.elm;
9496
}
9597

9698
disconnect() {
@@ -101,6 +103,6 @@ export class DOMPatcher {
101103
this.el = null;
102104
// patch with empty vnode to clear out listeners in tree
103105
// this ensures we don't leave dangling DetachedHTMLElements blocking GC
104-
patch(vnode, {sel: vnode.sel});
106+
patch(vnode, {sel: vnode.sel, key: vnode.key});
105107
}
106108
}

0 commit comments

Comments
 (0)