(current)
| 10751 | // deletion, so don't let them throw. Host-originating errors should |
| 10752 | // interrupt deletion, so it's okay |
| 10753 | function commitUnmount(current) { |
| 10754 | if (typeof onCommitUnmount === 'function') { |
| 10755 | onCommitUnmount(current); |
| 10756 | } |
| 10757 | |
| 10758 | switch (current.tag) { |
| 10759 | case ClassComponent: |
| 10760 | { |
| 10761 | safelyDetachRef(current); |
| 10762 | var _instance6 = current.stateNode; |
| 10763 | if (typeof _instance6.componentWillUnmount === 'function') { |
| 10764 | safelyCallComponentWillUnmount(current, _instance6); |
| 10765 | } |
| 10766 | return; |
| 10767 | } |
| 10768 | case HostComponent: |
| 10769 | { |
| 10770 | safelyDetachRef(current); |
| 10771 | return; |
| 10772 | } |
| 10773 | case CallComponent: |
| 10774 | { |
| 10775 | commitNestedUnmounts(current.stateNode); |
| 10776 | return; |
| 10777 | } |
| 10778 | case HostPortal: |
| 10779 | { |
| 10780 | // TODO: this is recursive. |
| 10781 | // We are also not using this parent because |
| 10782 | // the portal will get pushed immediately. |
| 10783 | if (enableMutatingReconciler && mutation) { |
| 10784 | unmountHostComponents(current); |
| 10785 | } else if (enablePersistentReconciler && persistence) { |
| 10786 | emptyPortalContainer(current); |
| 10787 | } |
| 10788 | return; |
| 10789 | } |
| 10790 | } |
| 10791 | } |
| 10792 | |
| 10793 | function commitNestedUnmounts(root) { |
| 10794 | // While we're inside a removed host node we don't want to call |
no test coverage detected