From 937c5bb283283d59eee5d77325c3fd1936c5f5ad Mon Sep 17 00:00:00 2001 From: newtextdoc1111 Date: Sun, 19 Oct 2025 23:39:06 +0900 Subject: [PATCH] fix: Fix TagData creation for invalid tag in RelatedTagsUI --- web/js/related-tags.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/web/js/related-tags.js b/web/js/related-tags.js index 71ef55c..4a00418 100644 --- a/web/js/related-tags.js +++ b/web/js/related-tags.js @@ -411,13 +411,8 @@ class RelatedTagsUI { .find((tagData) => tagData !== undefined); if (!tagData) { - tagData = new TagData({ - tag: this.currentTag, - source: TagSource.Danbooru, - category: 'unknown', - count: 0, - alias: [], - }); + // Create a dummy TagData if not found + tagData = new TagData(this.currentTag, null, 0, [], TagSource.Danbooru); } const categoryText = TagCategory[tagData.source][tagData.category] || "unknown";