File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,7 @@ class OutPortal<C extends Component<any>> extends React.PureComponent<OutPortalP
213213 // If we're switching portal nodes, we need to clean up the current one first.
214214 if ( this . currentPortalNode && node !== this . currentPortalNode ) {
215215 this . currentPortalNode . unmount ( this . placeholderNode . current ! ) ;
216+ this . currentPortalNode . setPortalProps ( { } as ComponentProps < C > ) ;
216217 this . currentPortalNode = node ;
217218 }
218219
@@ -225,6 +226,7 @@ class OutPortal<C extends Component<any>> extends React.PureComponent<OutPortalP
225226 componentWillUnmount ( ) {
226227 const node = this . props . node as AnyPortalNode < C > ;
227228 node . unmount ( this . placeholderNode . current ! ) ;
229+ node . setPortalProps ( { } as ComponentProps < C > ) ;
228230 }
229231
230232 render ( ) {
You can’t perform that action at this time.
0 commit comments