@wulperstudio/cms
Version:
Wulper Studio Library Components CMS
10 lines • 323 B
JavaScript
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;
}
}