소스 검색

fix(morph): currentNode can also be null, not just undefined, fixes #3728 (#3729)

Florian Stascheck 1 년 전
부모
커밋
b0b66d0408
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      packages/morph/src/morph.js

+ 1 - 1
packages/morph/src/morph.js

@@ -403,7 +403,7 @@ class Block {
 
         let currentNode = this.startComment.nextSibling
 
-        while (currentNode !== undefined && currentNode !== this.endComment) {
+        while (currentNode && currentNode !== this.endComment) {
             children.push(currentNode)
 
             currentNode = currentNode.nextSibling