MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / safelyDetachRef

Function safelyDetachRef

code/composition/public/app.js:11379–11394  ·  view source on GitHub ↗
(current)

Source from the content-addressed store, hash-verified

11377 }
11378
11379 function safelyDetachRef(current) {
11380 var ref = current.ref;
11381 if (ref !== null) {
11382 if (typeof ref === 'function') {
11383 {
11384 invokeGuardedCallback$3(null, ref, null, null);
11385 if (hasCaughtError$1()) {
11386 var refError = clearCaughtError$1();
11387 captureError(current, refError);
11388 }
11389 }
11390 } else {
11391 ref.current = null;
11392 }
11393 }
11394 }
11395
11396 function commitLifeCycles(finishedRoot, current, finishedWork, currentTime, committedExpirationTime) {
11397 switch (finishedWork.tag) {

Callers 1

commitUnmountFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected