Skip to content

Commit 4b76c69

Browse files
authored
chore: simplify await blocks (#9802)
We never pass a signal to await blocks currently, so the "is_signal" check is unnecessary
1 parent 9babce9 commit 4b76c69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/svelte/src/internal/client/render.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,7 +1726,7 @@ export function component(anchor_node, component_fn, render_fn) {
17261726
/**
17271727
* @template V
17281728
* @param {Comment} anchor_node
1729-
* @param {import('./types.js').Signal<Promise<V>> | Promise<V> | (() => Promise<V>)} input
1729+
* @param {(() => Promise<V>)} input
17301730
* @param {null | ((anchor: Node) => void)} pending_fn
17311731
* @param {null | ((anchor: Node, value: V) => void)} then_fn
17321732
* @param {null | ((anchor: Node, error: unknown) => void)} catch_fn
@@ -1834,7 +1834,7 @@ function await_block(anchor_node, input, pending_fn, then_fn, catch_fn) {
18341834
() => {
18351835
const token = {};
18361836
latest_token = token;
1837-
const promise = is_signal(input) ? get(input) : typeof input === 'function' ? input() : input;
1837+
const promise = input();
18381838
if (is_promise(promise)) {
18391839
promise.then(
18401840
/** @param {V} v */

0 commit comments

Comments
 (0)