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

Function safelyDetachRef

code/new-context-api/public/app.js:10602–10617  ·  view source on GitHub ↗
(current)

Source from the content-addressed store, hash-verified

10600 }
10601
10602 function safelyDetachRef(current) {
10603 var ref = current.ref;
10604 if (ref !== null) {
10605 if (typeof ref === 'function') {
10606 {
10607 invokeGuardedCallback$3(null, ref, null, null);
10608 if (hasCaughtError$1()) {
10609 var refError = clearCaughtError$1();
10610 captureError(current, refError);
10611 }
10612 }
10613 } else {
10614 ref.current = null;
10615 }
10616 }
10617 }
10618
10619 function commitLifeCycles(finishedRoot, current, finishedWork, currentTime, committedExpirationTime) {
10620 switch (finishedWork.tag) {

Callers 1

commitUnmountFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected