Skip to content

Commit

Permalink
fix #1417
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed May 5, 2018
1 parent 6437d7b commit 8d772b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
9 changes: 3 additions & 6 deletions src/compile/nodes/AwaitBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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(' && ')}
`);
}

Expand All @@ -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');
});
});
}
Expand Down
1 change: 0 additions & 1 deletion test/runtime/samples/await-then-catch-static/_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ let promise = new Promise(f => {
});

export default {
solo: 1,
data: {
promise
},
Expand Down

0 comments on commit 8d772b1

Please sign in to comment.