Skip to content

Commit

Permalink
remove finally from completion record in trystatement
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhauhau committed Jul 30, 2019
1 parent f08062b commit f6a5dc2
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
@@ -0,0 +1,9 @@
const x = do {
try {
a();
} catch (e) {
b();
} finally {
c();
}
}
@@ -0,0 +1,3 @@
{
"plugins": ["transform-block-scoping", "proposal-do-expressions"]
}
@@ -0,0 +1,9 @@
var x = function () {
try {
return a();
} catch (e) {
return b();
} finally {
c();
}
}();
1 change: 0 additions & 1 deletion packages/babel-traverse/src/path/family.js
Expand Up @@ -33,7 +33,6 @@ export function getCompletionRecords(): NodePath[] {
} else if (this.isTryStatement()) {
paths = addCompletionRecords(this.get("block"), paths);
paths = addCompletionRecords(this.get("handler"), paths);
paths = addCompletionRecords(this.get("finalizer"), paths);
} else if (this.isCatchClause()) {
paths = addCompletionRecords(this.get("body"), paths);
} else {
Expand Down

0 comments on commit f6a5dc2

Please sign in to comment.