Fix linter warning
parent
cae923b68a
commit
76a4c01577
|
|
@ -314,9 +314,9 @@ async function loadTagCounts() {
|
|||
if (resp) {
|
||||
for (let post of pop.posts)
|
||||
for (let tag of resp.results) {
|
||||
post.tags
|
||||
.find(postTag => tag.names.includes(postTag.name))
|
||||
.usages = tag.usages;
|
||||
// @ts-expect-error .find() can't return undefined because the resp.results list can only contain
|
||||
// the tags which we requested. And we only request the tags which are already set on the post.
|
||||
post.tags.find((postTag) => tag.names.includes(postTag.name)).usages = tag.usages;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue