nexxtway/react-rainbow

View on GitHub
src/components/InternalOverlay/helpers/resolveElement.js

Summary

Maintainability
A
55 mins
Test Coverage
export default function resolveElement(ref) {
    if (typeof ref === 'function') {
        const ret = ref();
        return ret && ret.current;
    }
    return ref && ref.current;
}