Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

Commit

Permalink
Adding optionalCatchBinding to plugins. (#521)
Browse files Browse the repository at this point in the history
  • Loading branch information
kesne authored and hzoo committed Sep 26, 2017
1 parent 905887c commit 5742b71
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Expand Up @@ -414,6 +414,7 @@ exports.parseNoPatch = function(code, options) {
"importMeta",
"classPrivateProperties",
"bigInt",
"optionalCatchBinding",
],
};

Expand Down
11 changes: 11 additions & 0 deletions test/non-regression.js
Expand Up @@ -1845,4 +1845,15 @@ describe("verify", () => {
[]
);
});

it("works with optionalCatchBinding", () => {
verifyAndAssertMessages(
unpad(`
try {} catch {}
try {} catch {} finally {}
`),
{},
[]
);
});
});

0 comments on commit 5742b71

Please sign in to comment.