Skip to content

Commit 9ff8cbe

Browse files
committed
fix: autocomplete tags on body when page has invalid content (#5262)
Removed children from content model check in command panel tags.
1 parent 87d810e commit 9ff8cbe

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
@@ -268,7 +268,9 @@ const $tagOptions = computed(
268268
newInstances.set(childInstance.id, childInstance);
269269
newInstances.set(instance.id, {
270270
...instance,
271-
children: [...instance.children, { type: "id", value: childInstance.id }],
271+
// avoid preserving original children to not invalidate tag
272+
// when some descendants do not satisfy content model
273+
children: [{ type: "id", value: childInstance.id }],
272274
});
273275
for (const tag of tags) {
274276
childInstance.tag = tag;

0 commit comments

Comments
 (0)