This commit is contained in:
Rizky 2024-03-17 15:41:49 +07:00
parent 9d1b1ca5b3
commit c1b1a35cf6
4 changed files with 4 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -17,6 +17,7 @@ export const loadcomp = {
};
export const loadComponent = async (p: PG, id_comp: string, sync?: boolean) => {
console.log("load comp", id_comp);
return new Promise<boolean>((resolve) => {
if (p.comp.list[id_comp]) {
resolve(true);

View File

@ -89,7 +89,6 @@ export const treeRebuild = async (p: PG, arg?: { note?: string }) => {
p.site.layout.id === p.page.cur.id &&
arg?.note === "load-layout page-init";
console.log("component loading", p.comp.list, p.comp.loaded);
for (const [k, v] of Object.entries(p.comp.list)) {
if (!p.comp.loaded[k]) {
const mcomp = v.doc.getMap("map").get("root");

View File

@ -40,9 +40,7 @@ export const createViPassProp = (
} else if (Array.isArray(arg.children)) {
let is_meta = true;
for (const c of arg.children) {
if (
!(!isValidElement(arg.children) && typeof arg.children === "object")
) {
if (!(!isValidElement(c) && typeof c === "object")) {
is_meta = false;
}
}