(current)
| 11520 | // deletion, so don't let them throw. Host-originating errors should |
| 11521 | // interrupt deletion, so it's okay |
| 11522 | function commitUnmount(current) { |
| 11523 | if (typeof onCommitUnmount === 'function') { |
| 11524 | onCommitUnmount(current); |
| 11525 | } |
| 11526 | |
| 11527 | switch (current.tag) { |
| 11528 | case ClassComponent: |
| 11529 | { |
| 11530 | safelyDetachRef(current); |
| 11531 | var _instance6 = current.stateNode; |
| 11532 | if (typeof _instance6.componentWillUnmount === 'function') { |
| 11533 | safelyCallComponentWillUnmount(current, _instance6); |
| 11534 | } |
| 11535 | return; |
| 11536 | } |
| 11537 | case HostComponent: |
| 11538 | { |
| 11539 | safelyDetachRef(current); |
| 11540 | return; |
| 11541 | } |
| 11542 | case CallComponent: |
| 11543 | { |
| 11544 | commitNestedUnmounts(current.stateNode); |
| 11545 | return; |
| 11546 | } |
| 11547 | case HostPortal: |
| 11548 | { |
| 11549 | // TODO: this is recursive. |
| 11550 | // We are also not using this parent because |
| 11551 | // the portal will get pushed immediately. |
| 11552 | if (enableMutatingReconciler && mutation) { |
| 11553 | unmountHostComponents(current); |
| 11554 | } else if (enablePersistentReconciler && persistence) { |
| 11555 | emptyPortalContainer(current); |
| 11556 | } |
| 11557 | return; |
| 11558 | } |
| 11559 | } |
| 11560 | } |
| 11561 | |
| 11562 | function commitNestedUnmounts(root) { |
| 11563 | // While we're inside a removed host node we don't want to call |
no test coverage detected