diff --git a/src/compiler/compile/render_dom/wrappers/AwaitBlock.ts b/src/compiler/compile/render_dom/wrappers/AwaitBlock.ts index 2bdc31948d44..2038943d8bbc 100644 --- a/src/compiler/compile/render_dom/wrappers/AwaitBlock.ts +++ b/src/compiler/compile/render_dom/wrappers/AwaitBlock.ts @@ -96,7 +96,7 @@ class AwaitBlockBranch extends Wrapper { `); this.block.chunks.declarations.push(b`${get_context}(#ctx)`); if (this.block.has_update_method) { - this.block.chunks.update.push(b`${get_context}(#ctx)`); + this.block.chunks.update.unshift(b`${get_context}(#ctx)`); } } } diff --git a/test/runtime/samples/await-then-destruct-if-reactive/_config.js b/test/runtime/samples/await-then-destruct-object-if/_config.js similarity index 100% rename from test/runtime/samples/await-then-destruct-if-reactive/_config.js rename to test/runtime/samples/await-then-destruct-object-if/_config.js diff --git a/test/runtime/samples/await-then-destruct-if-reactive/main.svelte b/test/runtime/samples/await-then-destruct-object-if/main.svelte similarity index 100% rename from test/runtime/samples/await-then-destruct-if-reactive/main.svelte rename to test/runtime/samples/await-then-destruct-object-if/main.svelte