diff --git a/src/compiler/compile/render_dom/wrappers/AwaitBlock.ts b/src/compiler/compile/render_dom/wrappers/AwaitBlock.ts index a902947c2c..e89b8d9460 100644 --- a/src/compiler/compile/render_dom/wrappers/AwaitBlock.ts +++ b/src/compiler/compile/render_dom/wrappers/AwaitBlock.ts @@ -188,7 +188,7 @@ export default class AwaitBlockWrapper extends Wrapper { ctx: #ctx, current: null, token: null, - hasCatch: false, + hasCatch: ${this.catch.node.start !== null ? 'true' : 'false'}, pending: ${this.pending.block.name}, then: ${this.then.block.name}, catch: ${this.catch.block.name}, @@ -201,12 +201,6 @@ export default class AwaitBlockWrapper extends Wrapper { let ${info} = ${info_props}; `); - if (this.catch.node.start !== null) { - block.chunks.init.push(b` - ${info}.hasCatch = true; - `); - } - block.chunks.init.push(b` @handle_promise(${promise} = ${snippet}, ${info}); `);