MCPcopy Index your code
hub / github.com/microsoft/SandDance / safelyDetachRef

Function safelyDetachRef

docs/external/js/react-dom.development.js:19731–19748  ·  view source on GitHub ↗
(current)

Source from the content-addressed store, hash-verified

19729 }
19730
19731 function safelyDetachRef(current) {
19732 var ref = current.ref;
19733
19734 if (ref !== null) {
19735 if (typeof ref === 'function') {
19736 {
19737 invokeGuardedCallback(null, ref, null, null);
19738
19739 if (hasCaughtError()) {
19740 var refError = clearCaughtError();
19741 captureCommitPhaseError(current, refError);
19742 }
19743 }
19744 } else {
19745 ref.current = null;
19746 }
19747 }
19748 }
19749
19750 function safelyCallDestroy(current, destroy) {
19751 {

Callers 1

commitUnmountFunction · 0.85

Calls 4

invokeGuardedCallbackFunction · 0.85
hasCaughtErrorFunction · 0.85
clearCaughtErrorFunction · 0.85
captureCommitPhaseErrorFunction · 0.85

Tested by

no test coverage detected