|
|
|
@ -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});
|
|
|
|
|
`);
|
|
|
|
|