Gazebo_simulation-Frontend/node_modules/.cache/babel-loader/8aa22f9a5b0fa7115752e9862bb11fd1.json
2020-12-22 09:59:14 -05:00

1 line
982 B
JSON

{"ast":null,"code":"import invariant from 'invariant';\nimport { useCallback } from 'react';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nexport default function useWrappedRefWithWarning(ref, componentName) {\n if (!(process.env.NODE_ENV !== \"production\")) return ref; // eslint-disable-next-line react-hooks/rules-of-hooks\n\n var warningRef = useCallback(function (refValue) {\n !(refValue == null || !refValue.isReactComponent) ? process.env.NODE_ENV !== \"production\" ? invariant(false, componentName + \" injected a ref to a provided `as` component that resolved to a component instance instead of a DOM element. \" + 'Use `React.forwardRef` to provide the injected ref to the class component as a prop in order to pass it directly to a DOM element') : invariant(false) : void 0;\n }, [componentName]); // eslint-disable-next-line react-hooks/rules-of-hooks\n\n return useMergedRefs(warningRef, ref);\n}","map":null,"metadata":{},"sourceType":"module"}