(current, nearestMountedAncestor)
| 11067 | } |
| 11068 | } |
| 11069 | function safelyAttachRef(current, nearestMountedAncestor) { |
| 11070 | try { |
| 11071 | var ref = current.ref; |
| 11072 | if (null !== ref) { |
| 11073 | var instance = current.stateNode; |
| 11074 | switch (current.tag) { |
| 11075 | case 26: |
| 11076 | case 27: |
| 11077 | case 5: |
| 11078 | var instanceToUse = instance; |
| 11079 | break; |
| 11080 | default: |
| 11081 | instanceToUse = instance; |
| 11082 | } |
| 11083 | "function" === typeof ref |
| 11084 | ? (current.refCleanup = ref(instanceToUse)) |
| 11085 | : (ref.current = instanceToUse); |
| 11086 | } |
| 11087 | } catch (error) { |
| 11088 | captureCommitPhaseError(current, nearestMountedAncestor, error); |
| 11089 | } |
| 11090 | } |
| 11091 | function safelyDetachRef(current, nearestMountedAncestor) { |
| 11092 | var ref = current.ref, |
| 11093 | refCleanup = current.refCleanup; |
no test coverage detected
searching dependent graphs…