Skip to content

Commit 359516a

Browse files
remove unnecessary conditions
1 parent 65f7a91 commit 359516a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/utils/object.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ export function deepAssign(target: any, ...sources: any[]): any {
4141
targetValue = null;
4242
} else {
4343
if (!targetValue) {
44-
if (sourceValue.constructor && sourceValue.constructor.prototype) {
45-
targetValue = Object.create(sourceValue.constructor.prototype);
46-
} else {
47-
targetValue = {};
48-
}
44+
targetValue = Object.create(sourceValue.constructor.prototype);
4945
}
5046
deepAssign(targetValue, sourceValue);
5147
}

0 commit comments

Comments
 (0)