Skip to content

Commit 568ef3e

Browse files
committed
break instead of return
1 parent ea2c6d7 commit 568ef3e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎packages/react-reconciler/src/ReactFiberCommitWork.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -730,11 +730,11 @@ function commitUnmount(current: Fiber): void {
730730
if (typeof instance.componentWillUnmount === 'function') {
731731
safelyCallComponentWillUnmount(current, instance);
732732
}
733-
return;
733+
break;
734734
}
735735
case HostComponent: {
736736
safelyDetachRef(current);
737-
return;
737+
break;
738738
}
739739
case HostPortal: {
740740
// TODO: this is recursive.
@@ -745,7 +745,7 @@ function commitUnmount(current: Fiber): void {
745745
} else if (supportsPersistence) {
746746
emptyPortalContainer(current);
747747
}
748-
return;
748+
break;
749749
}
750750
case EventComponent: {
751751
if (enableEventAPI) {

0 commit comments

Comments
 (0)