Skip to content

Commit

Permalink
Merge 9d27350 into 837a3cc
Browse files Browse the repository at this point in the history
  • Loading branch information
WikiRik committed Oct 25, 2023
2 parents 837a3cc + 9d27350 commit 5ebe2fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/shared/object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ export function deepAssign<T, S>(target: T, source: S): T & S;
export function deepAssign<S>(target: {}, source: S): S;
export function deepAssign(target: any, ...sources: any[]): any {
sources.forEach((source) => {
Object.getOwnPropertyNames(source).forEach((key) => assign(key, target, source));
Object.getOwnPropertyNames(source).forEach(
(key) =>
!['__proto__', 'constructor', 'prototype'].includes(key) && assign(key, target, source)
);
/* istanbul ignore next */
if (Object.getOwnPropertySymbols) {
Object.getOwnPropertySymbols(source).forEach((key) => assign(key, target, source));
Expand Down

0 comments on commit 5ebe2fe

Please sign in to comment.