Skip to content

Commit 44d58fe

Browse files
committed
fix(signals): gate serve's netted skip on the strict read, not on dev
Only the strict untrack read skips the fast block in dev; a hydration snapshot or a promoted write reaches serve in dev and prod alike and keeps the staged-read mark. 0 B in prod. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
1 parent ff5fe65 commit 44d58fe

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎packages/signals/src/core/core.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2278,10 +2278,11 @@ export function serve(el: Signal<any> | Computed<any>, c: Computed<any> | null):
22782278
}
22792279
// D-8 (#4452), as `read`'s fast block: a signal's staging equal to its
22802280
// committed value is writes that netted — no proposal, not a read of the
2281-
// frame's future. A plain signal reaches here in dev under a strict
2282-
// `untrack` (the fast block's `strictRead` test); in prod only through a
2283-
// hydration snapshot or a promoted write, which keep the mark.
2284-
if (!__DEV__ || (el as Computed<any>)._fn || el._pendingValue !== el._value) stagedRead(c!, el);
2281+
// frame's future. Only the strict `untrack` read skips the fast block in
2282+
// dev (its `strictRead` test); a hydration snapshot or a promoted write
2283+
// reaches here in dev and prod alike, and keeps the mark.
2284+
if (!(__DEV__ && strictRead) || (el as Computed<any>)._fn || el._pendingValue !== el._value)
2285+
stagedRead(c!, el);
22852286
// D-41: the staged answer is an error (`stageError`).
22862287
if (el._config & CONFIG_STAGED_ERROR) throw el._pendingValue;
22872288
if (__TEST__) shadowActual(SLOT_P);

0 commit comments

Comments
 (0)