diff --git a/index.js b/index.js index 79eb5a3c..ed1b8ff3 100644 --- a/index.js +++ b/index.js @@ -414,6 +414,7 @@ exports.parseNoPatch = function(code, options) { "importMeta", "classPrivateProperties", "bigInt", + "optionalCatchBinding", ], }; diff --git a/test/non-regression.js b/test/non-regression.js index 72f4ae07..4161af03 100644 --- a/test/non-regression.js +++ b/test/non-regression.js @@ -1845,4 +1845,15 @@ describe("verify", () => { [] ); }); + + it("works with optionalCatchBinding", () => { + verifyAndAssertMessages( + unpad(` + try {} catch {} + try {} catch {} finally {} + `), + {}, + [] + ); + }); });