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

Function safelyDetachRef

code/communication/public/app.js:11276–11291  ·  view source on GitHub ↗
(current)

Source from the content-addressed store, hash-verified

11274 }
11275
11276 function safelyDetachRef(current) {
11277 var ref = current.ref;
11278 if (ref !== null) {
11279 if (typeof ref === 'function') {
11280 {
11281 invokeGuardedCallback$3(null, ref, null, null);
11282 if (hasCaughtError$1()) {
11283 var refError = clearCaughtError$1();
11284 captureError(current, refError);
11285 }
11286 }
11287 } else {
11288 ref.current = null;
11289 }
11290 }
11291 }
11292
11293 function commitLifeCycles(finishedRoot, current, finishedWork, currentTime, committedExpirationTime) {
11294 switch (finishedWork.tag) {

Callers 1

commitUnmountFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected