Skip to content

Commit 48b74a6

Browse files
committed
fix
1 parent f5e0751 commit 48b74a6

File tree

1 file changed

+3
-2
lines changed
  • packages/svelte/src/internal/client/dom/blocks

1 file changed

+3
-2
lines changed

packages/svelte/src/internal/client/dom/blocks/await.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,10 @@ export function await_block(anchor, get_input, pending_fn, then_fn, catch_fn) {
7777
if (input === (input = get_input())) return;
7878

7979
if (is_promise(input)) {
80+
let was_hydrating = hydrating;
81+
8082
if (hydrating && pending_fn) {
8183
pending_effect = branch(() => pending_fn(anchor));
82-
return;
8384
}
8485

8586
var promise = /** @type {Promise<any>} */ (input);
@@ -111,7 +112,7 @@ export function await_block(anchor, get_input, pending_fn, then_fn, catch_fn) {
111112
// if the promise was already resolved, avoid thrash
112113
if (settled) return;
113114

114-
if (pending_fn) {
115+
if (pending_fn && !was_hydrating) {
115116
if (pending_effect && (pending_effect.f & INERT) === 0) {
116117
destroy_effect(pending_effect);
117118
}

0 commit comments

Comments
 (0)