MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / callIfFn

Function callIfFn

src/content/Backgrounds/Lightfall/Lightfall.jsx:316–320  ·  view source on GitHub ↗
(obj, key)

Source from the content-addressed store, hash-verified

314 container.removeChild(canvas);
315 }
316 const callIfFn = (obj, key) => {
317 if (obj && typeof obj[key] === 'function') {
318 obj[key].call(obj);
319 }
320 };
321 callIfFn(programRef.current, 'remove');
322 callIfFn(geometryRef.current, 'remove');
323 callIfFn(meshRef.current, 'remove');

Callers 1

LightfallFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected