@samitouri / QOS-React / commits / fefa1269e2

Revert accidentally committed existence check (#13931)

Andrew Clark committed Oct 23, 2018 at 14:27 UTC fefa1269e2a67fa5ef0992d5cc1d6114b7948b7e
1 file changed +1 -7
packages/react-reconciler/src/ReactFiberCommitWork.js
+1 -7
@@ -499,13 +499,7 @@ function commitUnmount(current: Fiber): void {
499 case ClassComponent: {
500 safelyDetachRef(current);
501 const instance = current.stateNode;
502 - if (
503 - // Typically, a component that mounted will have an instance. However,
504 - // outside of concurrent mode, a suspended component may commit without
505 - // an instance, so we need to check whether it exists.
506 - instance !== null &&
507 - typeof instance.componentWillUnmount === 'function'
508 - ) {
502 + if (typeof instance.componentWillUnmount === 'function') {
503 safelyCallComponentWillUnmount(current, instance);
504 }
505 return;