From 568ef3e7ea530023397d4f01af31a1ee0aad2549 Mon Sep 17 00:00:00 2001 From: paulshen Date: Wed, 19 Jun 2019 11:37:47 -0700 Subject: [PATCH] break instead of return --- packages/react-reconciler/src/ReactFiberCommitWork.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-reconciler/src/ReactFiberCommitWork.js b/packages/react-reconciler/src/ReactFiberCommitWork.js index 218abb076ed09..d11c381c89c83 100644 --- a/packages/react-reconciler/src/ReactFiberCommitWork.js +++ b/packages/react-reconciler/src/ReactFiberCommitWork.js @@ -730,11 +730,11 @@ function commitUnmount(current: Fiber): void { if (typeof instance.componentWillUnmount === 'function') { safelyCallComponentWillUnmount(current, instance); } - return; + break; } case HostComponent: { safelyDetachRef(current); - return; + break; } case HostPortal: { // TODO: this is recursive. @@ -745,7 +745,7 @@ function commitUnmount(current: Fiber): void { } else if (supportsPersistence) { emptyPortalContainer(current); } - return; + break; } case EventComponent: { if (enableEventAPI) {