Skip to content

Commit

Permalink
Remove prototype fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodrigo Cardoso authored and Rodrigo Cardoso committed May 18, 2021
1 parent 8b0ee2c commit 0924735
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/set.js
Expand Up @@ -17,7 +17,7 @@ const fieldFunction = (() => {
previous[current] = value;
return previous[current];
}
if (previous[current] && !isPrototypePolluted(current)) {
if (previous[current]) {
return previous[current];
}
previous[current] = {};
Expand All @@ -27,8 +27,6 @@ const fieldFunction = (() => {
return result;
};

const isPrototypePolluted = (key) => ['__proto__', 'constructor', 'prototype'].includes(key);

return {
set
};
Expand Down

0 comments on commit 0924735

Please sign in to comment.