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

Function safelyDetachRef

code/dependency-injection/public/app.js:11334–11349  ·  view source on GitHub ↗
(current)

Source from the content-addressed store, hash-verified

11332 }
11333
11334 function safelyDetachRef(current) {
11335 var ref = current.ref;
11336 if (ref !== null) {
11337 if (typeof ref === 'function') {
11338 {
11339 invokeGuardedCallback$3(null, ref, null, null);
11340 if (hasCaughtError$1()) {
11341 var refError = clearCaughtError$1();
11342 captureError(current, refError);
11343 }
11344 }
11345 } else {
11346 ref.current = null;
11347 }
11348 }
11349 }
11350
11351 function commitLifeCycles(finishedRoot, current, finishedWork, currentTime, committedExpirationTime) {
11352 switch (finishedWork.tag) {

Callers 1

commitUnmountFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected