fix: Fix TagData creation for invalid tag in RelatedTagsUI

This commit is contained in:
newtextdoc1111
2025-10-19 23:39:45 +09:00
parent 512dd88d7a
commit 937c5bb283
+2 -7
View File
@@ -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";