Skip to content

Commit

Permalink
exclude __proto__
Browse files Browse the repository at this point in the history
  • Loading branch information
doowb committed Feb 7, 2018
1 parent aef804b commit c873f34
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ function defaultsDeep(target, objects) {

function copy(target, current) {
lazy.forOwn(current, function (value, key) {
if (key === '__proto__') {
return;
}

var val = target[key];
// add the missing property, or allow a null property to be updated
if (val == null) {
Expand Down

0 comments on commit c873f34

Please sign in to comment.