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

Function safelyDetachRef

code/styling/public/app.js:11241–11256  ·  view source on GitHub ↗
(current)

Source from the content-addressed store, hash-verified

11239 }
11240
11241 function safelyDetachRef(current) {
11242 var ref = current.ref;
11243 if (ref !== null) {
11244 if (typeof ref === 'function') {
11245 {
11246 invokeGuardedCallback$3(null, ref, null, null);
11247 if (hasCaughtError$1()) {
11248 var refError = clearCaughtError$1();
11249 captureError(current, refError);
11250 }
11251 }
11252 } else {
11253 ref.current = null;
11254 }
11255 }
11256 }
11257
11258 function commitLifeCycles(finishedRoot, current, finishedWork, currentTime, committedExpirationTime) {
11259 switch (finishedWork.tag) {

Callers 1

commitUnmountFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected