Skip to content

Commit

Permalink
Experiment: filter keys via Object.prototype.hasOwnProperty.call
Browse files Browse the repository at this point in the history
  • Loading branch information
jayaddison committed Jul 7, 2020
1 parent 894ff8c commit 491c093
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/babel-plugin-transform-block-scoping/src/index.js
Expand Up @@ -340,7 +340,9 @@ const loopVisitor = {

function extendMap(map, obj) {
for (const key of Object.keys(obj)) {
map.set(key, obj[key]);
if (Object.prototype.hasOwnProperty.call(obj, key)) {
map.set(key, obj[key]);
}
}
}

Expand Down

0 comments on commit 491c093

Please sign in to comment.