fix: remove extra scope argument

This commit is contained in:
dpiercey 2025-10-31 18:31:30 -07:00 committed by Dylan Piercey
parent 9f2ffa8703
commit 407c55b8b3
3 changed files with 8 additions and 8 deletions

View File

@ -7,8 +7,8 @@
{ {
"name": "*", "name": "*",
"total": { "total": {
"min": 19325, "min": 19323,
"brotli": 7358 "brotli": 7323
} }
}, },
{ {

View File

@ -1,4 +1,4 @@
// size: 19325 (min) 7358 (brotli) // size: 19323 (min) 7323 (brotli)
var empty = [], var empty = [],
rest = Symbol(); rest = Symbol();
function attrTag(attrs) { function attrTag(attrs) {
@ -1726,7 +1726,7 @@ var runRender = (render) => render.M(render.q, render.H),
(branch = scope.k), (branch = scope.k),
!branch?.z && !branch?.z &&
(!checkPending || !handlePendingTry(fn, scope, branch)) && (!checkPending || !handlePendingTry(fn, scope, branch)) &&
fn(scope, scope)); fn(scope));
} else runEffects2(effects); } else runEffects2(effects);
} }
)(runEffects)), )(runEffects)),

View File

@ -1,7 +1,7 @@
import type { BranchScope, Scope } from "../common/types"; import type { BranchScope, Scope } from "../common/types";
import { renderCatch } from "./control-flow"; import { renderCatch } from "./control-flow";
import { enableBranches } from "./resume"; import { enableBranches } from "./resume";
import type { Signal } from "./signals"; import type { Signal, SignalFn } from "./signals";
type ExecFn<S extends Scope = Scope> = (scope: S, arg?: any) => void; type ExecFn<S extends Scope = Scope> = (scope: S, arg?: any) => void;
type PendingRender = { type PendingRender = {
@ -170,18 +170,18 @@ export let _enable_catch = () => {
(effects: unknown[], checkPending = placeholderShown.has(effects)) => { (effects: unknown[], checkPending = placeholderShown.has(effects)) => {
if (checkPending || caughtError.has(effects)) { if (checkPending || caughtError.has(effects)) {
let i = 0; let i = 0;
let fn: ExecFn; let fn: SignalFn;
let scope: Scope; let scope: Scope;
let branch: BranchScope | undefined; let branch: BranchScope | undefined;
for (; i < effects.length; ) { for (; i < effects.length; ) {
fn = effects[i++] as ExecFn; fn = effects[i++] as SignalFn;
scope = effects[i++] as Scope; scope = effects[i++] as Scope;
branch = scope.___closestBranch; branch = scope.___closestBranch;
if ( if (
!branch?.___destroyed && !branch?.___destroyed &&
!(checkPending && handlePendingTry(fn, scope, branch)) !(checkPending && handlePendingTry(fn, scope, branch))
) { ) {
fn(scope, scope); fn(scope);
} }
} }
} else { } else {