From 0fb5cdffccd172902e5098cadad2709e52e22784 Mon Sep 17 00:00:00 2001 From: Ben Kandelaars Date: Thu, 26 May 2022 11:35:56 +0100 Subject: [PATCH] Skip paramless catch clauses --- src/program/BlockStatement.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/program/BlockStatement.js b/src/program/BlockStatement.js index 43c4fba0..534250f3 100644 --- a/src/program/BlockStatement.js +++ b/src/program/BlockStatement.js @@ -160,7 +160,7 @@ export default class BlockStatement extends Node { indentation, introStatementGenerators ); - } else if ('CatchClause' === this.parent.type) { + } else if ('CatchClause' === this.parent.type && this.parent.param) { this.transpileParameters( [this.parent.param], code,