-
Notifications
You must be signed in to change notification settings - Fork 220
Open
Description
In "node_modules/deepmerge/dist/cjs.js" there's a line of code:
var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
React 19 uses "react.transitional.element" as its REACT_ELEMENT_TYPE, so operations that attempt to check if an object is a react element fails, such as the ReactChildren function "mapIntoArray" which does the following comparison in its switch statement:
`
case "object":
switch (children.$$typeof) {
case REACT_ELEMENT_TYPE:
case REACT_PORTAL_TYPE:
invokeCallback = true;
}
`
Since children.$$typeof is 'react.transitional.element', and deepmerge has its own definition of REACT_ELEMENT_TYPE being "react.element", this fails the check and the function mapIntoArray fails.
deammer
Metadata
Metadata
Assignees
Labels
No labels