diff --git a/src/compile/render-dom/wrappers/AwaitBlock.ts b/src/compile/render-dom/wrappers/AwaitBlock.ts index ca1fdcc64e..cbc03f8ce9 100644 --- a/src/compile/render-dom/wrappers/AwaitBlock.ts +++ b/src/compile/render-dom/wrappers/AwaitBlock.ts @@ -80,7 +80,7 @@ export default class AwaitBlockWrapper extends Wrapper { status, renderer, block, - parent, + this, child, stripWhitespace, nextSibling diff --git a/test/runtime/samples/await-containing-if/_config.js b/test/runtime/samples/await-containing-if/_config.js new file mode 100644 index 0000000000..9e24e4f614 --- /dev/null +++ b/test/runtime/samples/await-containing-if/_config.js @@ -0,0 +1,35 @@ +let fulfil; + +let thePromise = new Promise(f => { + fulfil = f; +}); + +export default { + props: { + thePromise, + show: true + }, + + html: ` +
loading...
the value is 42
the value is 42
loading...
+ {:then theValue} + {#if show} +the value is {theValue}
+ {/if} + {:catch theError} +oh no! {theError.message}
+ {/await} +