diff --git a/jsx-runtime/src/index.js b/jsx-runtime/src/index.js index f6e1b13101..0bc774121d 100644 --- a/jsx-runtime/src/index.js +++ b/jsx-runtime/src/index.js @@ -27,10 +27,11 @@ const isArray = Array.isArray; * @param {unknown} [__self] */ function createVNode(type, props, key, isStaticChildren, __source, __self) { + if (!props) props = {}; // We'll want to preserve `ref` in props to get rid of the need for // forwardRef components in the future, but that should happen via // a separate PR. - let normalizedProps = props || {}, + let normalizedProps = props, ref, i; if (normalizedProps && (ref = normalizedProps.ref)) {