setchilds fix

This commit is contained in:
rizrmd 2024-05-29 14:46:20 +07:00
parent fb36818cd7
commit e06490e967
2 changed files with 7 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@ -187,6 +187,8 @@ export const devItem = (
item[k] = v; item[k] = v;
} }
} else if (c.type === "child" && Array.isArray(c.childs)) { } else if (c.type === "child" && Array.isArray(c.childs)) {
console.log("faisol", c.childs);
if (item.component?.id) { if (item.component?.id) {
if (!item.component.props) { if (!item.component.props) {
item.component.props = {}; item.component.props = {};
@ -198,12 +200,10 @@ export const devItem = (
type: "item", type: "item",
id: createId(), id: createId(),
name: "child", name: "child",
childs: [ childs: removeEditFromChilds(
removeEditFromChilds( c.childs.filter((e) => e),
c.childs.filter((e) => e), compile
compile ),
)[0],
],
}, },
}; };
} else { } else {