From 39eef0b13a9ab97ca69088c1aa6b920fc3139117 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue, 19 Aug 2025 01:07:02 -0700 Subject: [PATCH] And this frontend one --- .../app/components/common/input/tags/tags.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src-ui/src/app/components/common/input/tags/tags.component.ts b/src-ui/src/app/components/common/input/tags/tags.component.ts index b908ee59d..15907bbbb 100644 --- a/src-ui/src/app/components/common/input/tags/tags.component.ts +++ b/src-ui/src/app/components/common/input/tags/tags.component.ts @@ -142,12 +142,12 @@ export class TagsComponent implements OnInit, ControlValueAccessor { } private removeChildren(tagIDs: number[], tag: Tag) { - if (tag.children.length > 0) { + if (tag.children?.length) { const childIDs = tag.children.map((child) => child.id) tagIDs = tagIDs.filter((id) => !childIDs.includes(id)) - } - for (const child of tag.children) { - tagIDs = this.removeChildren(tagIDs, child) + for (const child of tag.children) { + tagIDs = this.removeChildren(tagIDs, child) + } } return tagIDs }