From 8d772b163b51a627e027d7b616a64e3a8578669f Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 5 May 2018 13:54:20 -0400 Subject: [PATCH] fix #1417 --- src/compile/nodes/AwaitBlock.ts | 9 +++------ test/runtime/samples/await-then-catch-static/_config.js | 1 - 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/compile/nodes/AwaitBlock.ts b/src/compile/nodes/AwaitBlock.ts index 499e84843684..19d863ccdaef 100644 --- a/src/compile/nodes/AwaitBlock.ts +++ b/src/compile/nodes/AwaitBlock.ts @@ -140,7 +140,7 @@ export default class AwaitBlock extends Node { ); block.builders.update.addLine( - `${info}.ctx = ctx` + `${info}.ctx = ctx;` ); if (this.pending.block.hasUpdateMethod) { @@ -153,10 +153,7 @@ export default class AwaitBlock extends Node { `); } else { block.builders.update.addBlock(deindent` - if (${conditions.join(' && ')}) { - ${info}.block.c(); - ${info}.block.m(${anchor}.parentNode, ${anchor}); - } + ${conditions.join(' && ')} `); } @@ -171,7 +168,7 @@ export default class AwaitBlock extends Node { [this.pending, this.then, this.catch].forEach(status => { status.children.forEach(child => { - child.build(status.block, null,'nodes'); + child.build(status.block, null, 'nodes'); }); }); } diff --git a/test/runtime/samples/await-then-catch-static/_config.js b/test/runtime/samples/await-then-catch-static/_config.js index 8029737d2761..e718916f6201 100644 --- a/test/runtime/samples/await-then-catch-static/_config.js +++ b/test/runtime/samples/await-then-catch-static/_config.js @@ -5,7 +5,6 @@ let promise = new Promise(f => { }); export default { - solo: 1, data: { promise },