This commit is contained in:
Rizky 2024-03-22 14:03:22 +07:00
parent bedc8a57ce
commit 122aba4339
2 changed files with 17 additions and 15 deletions

File diff suppressed because one or more lines are too long

View File

@ -103,20 +103,22 @@ export const genComp = (p: GenMetaP, arg: GenMetaArg) => {
for (const child of Object.values(item.childs)) {
if (child?.name?.startsWith("jsx:")) continue;
genMeta(
{ ...p, mode: "comp" },
{
item: child,
is_root: false,
root: arg.root || arg.item,
parent: {
item,
instance_id: item.id,
root_instances: instances,
comp: item_comp,
},
}
);
if (child && Object.keys(child).length > 1) {
genMeta(
{ ...p, mode: "comp" },
{
item: child,
is_root: false,
root: arg.root || arg.item,
parent: {
item,
instance_id: item.id,
root_instances: instances,
comp: item_comp,
},
}
);
}
}
}
}