Skip to content

Commit 996a4b6

Browse files
author
Diogo Franco (Kovensky)
committed
Fix issue webpack#3238
1 parent 9085e1e commit 996a4b6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/Parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ Parser.prototype.inScope = function inScope(params, fn) {
909909
};
910910

911911
Parser.prototype.enterPattern = function enterPattern(pattern, onIdent) {
912-
if(this["enter" + pattern.type])
912+
if(pattern != null && this["enter" + pattern.type])
913913
return this["enter" + pattern.type](pattern, onIdent);
914914
};
915915

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
it("should pass", function() {
2+
const second = ([, x]) => x;
3+
second([1, 2]).should.eql(2);
4+
});

0 commit comments

Comments
 (0)