fix[Utils]: fixed deepClone error msg (#1748)
This commit is contained in:
parent
63dba8b7d8
commit
ae6bbf7858
|
@ -274,7 +274,7 @@ export function debounce(func, wait, immediate) {
|
||||||
*/
|
*/
|
||||||
export function deepClone(source) {
|
export function deepClone(source) {
|
||||||
if (!source && typeof source !== 'object') {
|
if (!source && typeof source !== 'object') {
|
||||||
throw new Error('error arguments', 'shallowClone')
|
throw new Error('error arguments', 'deepClone')
|
||||||
}
|
}
|
||||||
const targetObj = source.constructor === Array ? [] : {}
|
const targetObj = source.constructor === Array ? [] : {}
|
||||||
Object.keys(source).forEach(keys => {
|
Object.keys(source).forEach(keys => {
|
||||||
|
|
Loading…
Reference in New Issue