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

Function commitDetachRef

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

Source from the content-addressed store, hash-verified

20169 }
20170
20171 function commitDetachRef(current) {
20172 var currentRef = current.ref;
20173
20174 if (currentRef !== null) {
20175 if (typeof currentRef === 'function') {
20176 currentRef(null);
20177 } else {
20178 currentRef.current = null;
20179 }
20180 }
20181 } // User-originating errors (lifecycles and refs) should not interrupt
20182 // deletion, so don't let them throw. Host-originating errors should
20183 // interrupt deletion, so it's okay
20184

Callers 1

commitMutationEffectsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected