Skip to content

Commit 9b02db3

Browse files
authored
Merge pull request #41 from hardfist/patch-1
Update implementation-notes.md
2 parents 4733648 + ca77459 commit 9b02db3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

content/docs/implementation-notes.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ We collect DOM operations on children in a list so we can execute them in batch:
750750
// If we can't update an existing instance, we have to unmount it
751751
// and mount a new one instead of it.
752752
if (!canUpdate) {
753-
var prevNode = prevChild.node;
753+
var prevNode = prevChild.getHostNode();
754754
prevChild.unmount();
755755

756756
var nextChild = instantiateComponent(nextChildren[i]);
@@ -770,12 +770,12 @@ We collect DOM operations on children in a list so we can execute them in batch:
770770

771771
// Finally, unmount any children that don't exist:
772772
for (var j = nextChildren.length; j < prevChildren.length; j++) {
773-
var prevChild = prevRenderedChildren[j];
774-
var node = prevChild.node;
775-
prevChild.unmount();
773+
var prevChild = prevRenderedChildren[j];
774+
    var node = prevChild.getHostNode();
775+
prevChild.unmount();
776776

777-
// Record that we need to remove the node
778-
operationQueue.push({type: 'REMOVE', node});
777+
// Record that we need to remove the node
778+
operationQueue.push({type: 'REMOVE', node});
779779
}
780780

781781
// Point the list of rendered children to the updated version.

0 commit comments

Comments
 (0)