()
| 70 | // React <19 never calls ref callbacks with `null` during unmount, so we |
| 71 | // eagerly tear down existing observers manually whenever the target changes. |
| 72 | const cleanupExisting = () => { |
| 73 | if (observerCleanupRef.current) { |
| 74 | const cleanup = observerCleanupRef.current; |
| 75 | observerCleanupRef.current = undefined; |
| 76 | cleanup(); |
| 77 | } |
| 78 | }; |
| 79 | |
| 80 | if (element === observedElementRef.current) { |
| 81 | return observerCleanupRef.current; |
no outgoing calls
no test coverage detected
searching dependent graphs…