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": "*",
"total": {
"min": 19325,
"brotli": 7358
"min": 19323,
"brotli": 7323
}
},
{

View File

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

View File

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