Skip to content

Commit 556f555

Browse files
committedSep 6, 2019
No param in CatchClause should not crash
1 parent 9ddff4c commit 556f555

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎lib/infer.js

+1
Original file line numberDiff line numberDiff line change
@@ -1134,6 +1134,7 @@
11341134
walk.base.BlockStatement(node, scope, c);
11351135
},
11361136
CatchClause: function(node, scope, c) {
1137+
if (!node.param) { return; }
11371138
scope = node.scope = new Scope(scope, node, false, true);
11381139
if (node.param.type == "Identifier") {
11391140
var v = addVar(scope, node.param);

0 commit comments

Comments
 (0)
Please sign in to comment.