Skip to content

Commit

Permalink
Ignore __proto__ fields in deepMerge
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor-scheer committed Jun 4, 2019
1 parent 116e1b4 commit cea7397
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/apollo-gateway/src/utilities/deepMerge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export function deepMerge(target: any, source: any): any {
if (source === undefined || source === null) return target;

for (const key of Object.keys(source)) {
if (source[key] === undefined) continue;
if (source[key] === undefined || key === '__proto__') continue;

if (target[key] && isObject(source[key])) {
deepMerge(target[key], source[key]);
Expand Down

0 comments on commit cea7397

Please sign in to comment.