UNPKG

@sb1/ffe-collapse-react

Version:
17 lines (16 loc) 444 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.mergeRefs = mergeRefs; function mergeRefs(refs) { return value => { refs.forEach(ref => { if (typeof ref === 'function') { ref(value); } else if (ref != null) { // eslint-disable-next-line no-param-reassign ref.current = value; } }); }; }