UNPKG

@wulperstudio/cms

Version:
10 lines 323 B
import { matchIsObject } from './object'; export function assocRefToPropRef(ref, propRef) { if (typeof propRef === 'function') { propRef(ref); } else if (propRef && matchIsObject(propRef) && 'current' in propRef) { // @ts-ignore // eslint-disable-next-line no-param-reassign propRef.current = ref; } }