Skip to content

Commit 859106c

Browse files
committed
fix(signals): drop escalate's separate rethrow argument
Every call site now rethrows the cause it halts with, so the parameter goes: -6 B minified on the floors instead of +5. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
1 parent 841aa88 commit 859106c

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ function notifyEffectStatus(this: Effect<any>): void {
126126
escalate(
127127
this,
128128
unwrapStatusError(actualError),
129-
undefined,
130129
__DEV__ && actualError instanceof StatusError ? actualError.source : this
131130
);
132131
} else if (this._type === EFFECT_RENDER) {
@@ -159,16 +158,11 @@ function notifyEffectStatus(this: Effect<any>): void {
159158
}
160159

161160
/** An effect's error no boundary takes halts the system (boundary-or-halt):
162-
* halted with `cause`, `thrown` rethrown; dev locates it at `subject`. */
163-
function escalate(
164-
node: Effect<any>,
165-
cause: unknown,
166-
thrown: unknown = cause,
167-
subject: DiagnosticSubject = node
168-
): void {
161+
* halted with `cause` and rethrown; dev locates it at `subject`. */
162+
function escalate(node: Effect<any>, cause: unknown, subject: DiagnosticSubject = node): void {
169163
if (!globalQueue.notify(node, STATUS_ERROR, STATUS_ERROR)) {
170164
__DEV__ ? haltReactivityAt(cause, subject) : haltReactivity(cause);
171-
throw thrown;
165+
throw cause;
172166
}
173167
}
174168

0 commit comments

Comments
 (0)