@mui/utils
Advanced tools
Comparing version 6.4.0 to 6.4.1
@@ -10,2 +10,3 @@ "use strict"; | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactIs = require("react-is"); | ||
// https://github.com/sindresorhus/is-plain-obj/blob/main/index.js | ||
@@ -20,3 +21,3 @@ function isPlainObject(item) { | ||
function deepClone(source) { | ||
if (/*#__PURE__*/React.isValidElement(source) || !isPlainObject(source)) { | ||
if (/*#__PURE__*/React.isValidElement(source) || (0, _reactIs.isValidElementType)(source) || !isPlainObject(source)) { | ||
return source; | ||
@@ -57,3 +58,3 @@ } | ||
Object.keys(source).forEach(key => { | ||
if (/*#__PURE__*/React.isValidElement(source[key])) { | ||
if (/*#__PURE__*/React.isValidElement(source[key]) || (0, _reactIs.isValidElementType)(source[key])) { | ||
output[key] = source[key]; | ||
@@ -60,0 +61,0 @@ } else if (isPlainObject(source[key]) && |
import * as React from 'react'; | ||
import { isValidElementType } from 'react-is'; | ||
@@ -12,3 +13,3 @@ // https://github.com/sindresorhus/is-plain-obj/blob/main/index.js | ||
function deepClone(source) { | ||
if (/*#__PURE__*/React.isValidElement(source) || !isPlainObject(source)) { | ||
if (/*#__PURE__*/React.isValidElement(source) || isValidElementType(source) || !isPlainObject(source)) { | ||
return source; | ||
@@ -49,3 +50,3 @@ } | ||
Object.keys(source).forEach(key => { | ||
if (/*#__PURE__*/React.isValidElement(source[key])) { | ||
if (/*#__PURE__*/React.isValidElement(source[key]) || isValidElementType(source[key])) { | ||
output[key] = source[key]; | ||
@@ -52,0 +53,0 @@ } else if (isPlainObject(source[key]) && |
/** | ||
* @mui/utils v6.4.0 | ||
* @mui/utils v6.4.1 | ||
* | ||
@@ -4,0 +4,0 @@ * @license MIT |
import * as React from 'react'; | ||
import { isValidElementType } from 'react-is'; | ||
@@ -12,3 +13,3 @@ // https://github.com/sindresorhus/is-plain-obj/blob/main/index.js | ||
function deepClone(source) { | ||
if (/*#__PURE__*/React.isValidElement(source) || !isPlainObject(source)) { | ||
if (/*#__PURE__*/React.isValidElement(source) || isValidElementType(source) || !isPlainObject(source)) { | ||
return source; | ||
@@ -49,3 +50,3 @@ } | ||
Object.keys(source).forEach(key => { | ||
if (/*#__PURE__*/React.isValidElement(source[key])) { | ||
if (/*#__PURE__*/React.isValidElement(source[key]) || isValidElementType(source[key])) { | ||
output[key] = source[key]; | ||
@@ -52,0 +53,0 @@ } else if (isPlainObject(source[key]) && |
/** | ||
* @mui/utils v6.4.0 | ||
* @mui/utils v6.4.1 | ||
* | ||
@@ -4,0 +4,0 @@ * @license MIT |
{ | ||
"name": "@mui/utils", | ||
"version": "6.4.0", | ||
"version": "6.4.1", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "author": "MUI Team", |
Sorry, the diff of this file is too big to display
341910
5883