Skip to content

Commit 9778421

Browse files
committed
get context at start of if update block instead of at the end, fixes sveltejs#5508
1 parent 2d5bf24 commit 9778421

File tree

3 files changed

+1
-1
lines changed

3 files changed

+1
-1
lines changed

src/compiler/compile/render_dom/wrappers/AwaitBlock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class AwaitBlockBranch extends Wrapper {
9696
`);
9797
this.block.chunks.declarations.push(b`${get_context}(#ctx)`);
9898
if (this.block.has_update_method) {
99-
this.block.chunks.update.push(b`${get_context}(#ctx)`);
99+
this.block.chunks.update.unshift(b`${get_context}(#ctx)`);
100100
}
101101
}
102102
}

0 commit comments

Comments
 (0)