MCPcopy Create free account
hub / github.com/reactjs/react-rails / safelyDetachRef

Function safelyDetachRef

lib/assets/react-source/development/react.js:23291–23308  ·  view source on GitHub ↗
(current)

Source from the content-addressed store, hash-verified

23289 }
23290
23291 function safelyDetachRef(current) {
23292 var ref = current.ref;
23293
23294 if (ref !== null) {
23295 if (typeof ref === 'function') {
23296 {
23297 invokeGuardedCallback(null, ref, null, null);
23298
23299 if (hasCaughtError()) {
23300 var refError = clearCaughtError();
23301 captureCommitPhaseError(current, refError);
23302 }
23303 }
23304 } else {
23305 ref.current = null;
23306 }
23307 }
23308 }
23309
23310 function safelyCallDestroy(current, destroy) {
23311 {

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