fix scope

This commit is contained in:
Rizky 2023-10-19 15:46:18 +07:00
parent 1478d02cfc
commit faed51c613
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
import { FC, ReactNode, Suspense, isValidElement, useEffect } from "react";
import { FC, ReactNode, Suspense, useEffect } from "react";
import { deepClone } from "web-utils";
import { createAPI, createDB } from "../../../utils/script/init-api";
import { ErrorBox } from "../../editor/elements/e-error";
@ -148,7 +148,7 @@ export const mergeScopeUpwards = (
scope = { ...cur.scope, ...indexedScope, ...cur.comp?.propval };
for (const [k, v] of Object.entries(scope)) {
if (typeof finalScope[k] === "undefined") finalScope[k] = v;
finalScope[k] = v;
}
if (opt?.each) {
if (!opt.each(cur, scope)) {