Skip to content

Commit

Permalink
skip __proto__
Browse files Browse the repository at this point in the history
  • Loading branch information
GrosSacASac committed Jul 25, 2019
1 parent 4194fcf commit cb9e2c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "utilsac",
"version": "10.5.0",
"version": "10.5.1",
"description": "Utility functions",
"type": "module",
"main": "utility.js",
Expand Down
3 changes: 3 additions & 0 deletions utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,9 @@ const deepAssign = (target, ...sources) => {
return;
}
Object.entries(source).forEach(([key, value]) => {
if (key === `__proto__`) {
return;
}
if (!value || typeof value !== `object`) {
target[key] = value;
return;
Expand Down

0 comments on commit cb9e2c3

Please sign in to comment.