We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47acf72 commit 63e7ed0Copy full SHA for 63e7ed0
index.js
@@ -70,6 +70,7 @@ module.exports = function (args, opts) {
70
var o = obj;
71
keys.slice(0,-1).forEach(function (key) {
72
if (o[key] === undefined) o[key] = {};
73
+ if (o[key] === {}.__proto__) o[key] = {};
74
o = o[key];
75
});
76
test/proto.js
@@ -4,5 +4,6 @@ var test = require('tape');
4
test('proto pollution', function (t) {
5
var argv = parse(['--__proto__.x','123']);
6
t.equal({}.x, undefined);
7
+ t.equal(argv.__proto__.x, 123);
8
t.end();
9
0 commit comments