Skip to content

Commit 26e4a4c

Browse files
committed
move error to correct place
1 parent 95400b5 commit 26e4a4c

File tree

1 file changed

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

1 file changed

+3
-8
lines changed

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,10 @@ export class Boundary {
238238
if (!this.has_pending_snippet()) {
239239
if (this.parent) {
240240
this.parent.#update_pending_count(d);
241+
return;
241242
}
242243

243-
return;
244+
e.await_outside_boundary();
244245
}
245246

246247
this.#pending_count += d;
@@ -403,13 +404,7 @@ function move_effect(effect, fragment) {
403404
}
404405

405406
export function get_boundary() {
406-
var boundary = /** @type {Effect} */ (active_effect).b;
407-
408-
if (boundary === null) {
409-
e.await_outside_boundary();
410-
}
411-
412-
return boundary;
407+
return /** @type {Effect} */ (active_effect).b;
413408
}
414409

415410
export function pending() {

0 commit comments

Comments
 (0)