Skip to content

Commit 641cddc

Browse files
committed
Fix domFor hitting null dom elements in while loop
1 parent a79b0f4 commit 641cddc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

render/domFor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
var delayedRemoval = new WeakMap
44

5-
function *domFor(vnode) {
5+
function* domFor(vnode) {
66
// To avoid unintended mangling of the internal bundler,
77
// parameter destructuring is not used here.
88
var dom = vnode.dom
@@ -18,7 +18,7 @@ function *domFor(vnode) {
1818

1919
dom = nextSibling
2020
}
21-
while (domSize)
21+
while (domSize && dom != null)
2222
}
2323

2424
module.exports = {

0 commit comments

Comments
 (0)