Fix linter warning

pull/57/head
neobooru 2024-07-10 20:34:00 +02:00
parent cae923b68a
commit 76a4c01577
1 changed files with 3 additions and 3 deletions

View File

@ -314,9 +314,9 @@ async function loadTagCounts() {
if (resp) { if (resp) {
for (let post of pop.posts) for (let post of pop.posts)
for (let tag of resp.results) { for (let tag of resp.results) {
post.tags // @ts-expect-error .find() can't return undefined because the resp.results list can only contain
.find(postTag => tag.names.includes(postTag.name)) // the tags which we requested. And we only request the tags which are already set on the post.
.usages = tag.usages; post.tags.find((postTag) => tag.names.includes(postTag.name)).usages = tag.usages;
} }
} }
} }