mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
fix: remove extra scope argument
This commit is contained in:
parent
9f2ffa8703
commit
407c55b8b3
@ -7,8 +7,8 @@
|
||||
{
|
||||
"name": "*",
|
||||
"total": {
|
||||
"min": 19325,
|
||||
"brotli": 7358
|
||||
"min": 19323,
|
||||
"brotli": 7323
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@ -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)),
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user