Skip to content

Commit 31cf38d

Browse files
authored
fix: autocomplete tags on body when page has invalid content (#5262)
Removed children from content model check in command panel tags.
1 parent bac4627 commit 31cf38d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/builder/app/builder/features/command-panel/command-panel.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,9 @@ const $tagOptions = computed(
265265
newInstances.set(childInstance.id, childInstance);
266266
newInstances.set(instance.id, {
267267
...instance,
268-
children: [...instance.children, { type: "id", value: childInstance.id }],
268+
// avoid preserving original children to not invalidate tag
269+
// when some descendants do not satisfy content model
270+
children: [{ type: "id", value: childInstance.id }],
269271
});
270272
for (const tag of tags) {
271273
childInstance.tag = tag;

0 commit comments

Comments
 (0)