(current)
| 10660 | // deletion, so don't let them throw. Host-originating errors should |
| 10661 | // interrupt deletion, so it's okay |
| 10662 | function commitUnmount(current) { |
| 10663 | if (typeof onCommitUnmount === 'function') { |
| 10664 | onCommitUnmount(current); |
| 10665 | } |
| 10666 | |
| 10667 | switch (current.tag) { |
| 10668 | case ClassComponent: |
| 10669 | { |
| 10670 | safelyDetachRef(current); |
| 10671 | var _instance6 = current.stateNode; |
| 10672 | if (typeof _instance6.componentWillUnmount === 'function') { |
| 10673 | safelyCallComponentWillUnmount(current, _instance6); |
| 10674 | } |
| 10675 | return; |
| 10676 | } |
| 10677 | case HostComponent: |
| 10678 | { |
| 10679 | safelyDetachRef(current); |
| 10680 | return; |
| 10681 | } |
| 10682 | case CallComponent: |
| 10683 | { |
| 10684 | commitNestedUnmounts(current.stateNode); |
| 10685 | return; |
| 10686 | } |
| 10687 | case HostPortal: |
| 10688 | { |
| 10689 | // TODO: this is recursive. |
| 10690 | // We are also not using this parent because |
| 10691 | // the portal will get pushed immediately. |
| 10692 | if (enableMutatingReconciler && mutation) { |
| 10693 | unmountHostComponents(current); |
| 10694 | } else if (enablePersistentReconciler && persistence) { |
| 10695 | emptyPortalContainer(current); |
| 10696 | } |
| 10697 | return; |
| 10698 | } |
| 10699 | } |
| 10700 | } |
| 10701 | |
| 10702 | function commitNestedUnmounts(root) { |
| 10703 | // While we're inside a removed host node we don't want to call |
no test coverage detected