Skip to content

Commit

Permalink
fix: cast INSVNode to NSVElement
Browse files Browse the repository at this point in the history
  • Loading branch information
rigor789 committed Feb 29, 2020
1 parent ffc835a commit 3cf6589
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/runtime/src/nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export class NSVElement extends NSVNode implements INSVElement {
.findIndex(node => node.nodeId === el.nodeId)

if (el.nodeType === NSVNodeTypes.ELEMENT) {
addChild(el, this, trueIndex)
addChild(el as NSVElement, this, trueIndex)
}
}

Expand All @@ -179,7 +179,7 @@ export class NSVElement extends NSVNode implements INSVElement {
el.parentNode = this

if (el.nodeType === NSVNodeTypes.ELEMENT) {
addChild(el, this)
addChild(el as NSVElement, this)
}
}

Expand All @@ -190,7 +190,7 @@ export class NSVElement extends NSVNode implements INSVElement {
this.childNodes.splice(index, 1)
el.parentNode = null
if (el.nodeType === NSVNodeTypes.ELEMENT) {
removeChild(el, this)
removeChild(el as NSVElement, this)
}
}
}
Expand Down

0 comments on commit 3cf6589

Please sign in to comment.