Skip to content

Commit 51b95b8

Browse files
Fix race conditions when swapping nodes between OutPortals
1 parent 3e59359 commit 51b95b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ class OutPortal<C extends Component<any>> extends React.PureComponent<OutPortalP
199199

200200
// If we're switching portal nodes, we need to clean up the current one first.
201201
if (this.currentPortalNode && node !== this.currentPortalNode) {
202-
this.currentPortalNode.unmount();
202+
this.currentPortalNode.unmount(this.placeholderNode.current!);
203203
this.currentPortalNode = node;
204204
}
205205

0 commit comments

Comments
 (0)