Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* eslint-disable no-console */
if (process.env.NODE_ENV === 'development') {
const omi = require('omi');
const options = omi.options;
const oldVnodeOption = options.vnode;
options.vnode = function(vnode) {
const { nodeName, attributes, children } = vnode;
if (nodeName === void 0) {
console.error('Undefined component passed to omi.h()\n'+serializeVNode(vnode));
}
if (
attributes && attributes.ref !== void 0 &&
typeof attributes.ref !== 'function' &&
!('$$typeof' in vnode) // allow string refs when omi-compat is installed
) {
throw new Error(
`Component's "ref" property should be a function,` +