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

Function safelyDetachRef

code/third-party/public/app.js:10474–10489  ·  view source on GitHub ↗
(current)

Source from the content-addressed store, hash-verified

10472 }
10473
10474 function safelyDetachRef(current) {
10475 var ref = current.ref;
10476 if (ref !== null) {
10477 if (typeof ref === 'function') {
10478 {
10479 invokeGuardedCallback$3(null, ref, null, null);
10480 if (hasCaughtError$1()) {
10481 var refError = clearCaughtError$1();
10482 captureError(current, refError);
10483 }
10484 }
10485 } else {
10486 ref.current = null;
10487 }
10488 }
10489 }
10490
10491 function commitLifeCycles(finishedRoot, current, finishedWork, currentTime, committedExpirationTime) {
10492 switch (finishedWork.tag) {

Callers 1

commitUnmountFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected