Skip to content

Commit

Permalink
Fix portal crash. (#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
reak998 committed May 29, 2020
1 parent 1f2d260 commit f79f3e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/reconciler.tsx
Expand Up @@ -312,7 +312,8 @@ function removeChild(parentInstance: any, child: any) {
parentInstance.remove(child)
} else {
child.parent = null
parentInstance.__objects = parentInstance.__objects.filter((x: any) => x !== child)
if (parentInstance.__objects)
parentInstance.__objects = parentInstance.__objects.filter((x: any) => x !== child)
// Remove attachment
if (child.attach) parentInstance[child.attach] = null
else if (child.attachArray)
Expand Down

0 comments on commit f79f3e0

Please sign in to comment.