fix[Utils]: fixed deepClone error msg (#1748)
This commit is contained in:
parent
d1b786946c
commit
3594052c90
|
@ -278,7 +278,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