( current: Fiber, nearestMountedAncestor: Fiber | null, )
| 824 | |
| 825 | // Capture errors so they don't interrupt mounting. |
| 826 | export function safelyAttachRef( |
| 827 | current: Fiber, |
| 828 | nearestMountedAncestor: Fiber | null, |
| 829 | ) { |
| 830 | try { |
| 831 | if (__DEV__) { |
| 832 | runWithFiberInDEV(current, commitAttachRef, current); |
| 833 | } else { |
| 834 | commitAttachRef(current); |
| 835 | } |
| 836 | } catch (error) { |
| 837 | captureCommitPhaseError(current, nearestMountedAncestor, error); |
| 838 | } |
| 839 | } |
| 840 | |
| 841 | export function safelyDetachRef( |
| 842 | current: Fiber, |
no test coverage detected