diff --git a/src/popup/pages/PopupMain.vue b/src/popup/pages/PopupMain.vue index 5c198b8..a5d5d75 100644 --- a/src/popup/pages/PopupMain.vue +++ b/src/popup/pages/PopupMain.vue @@ -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; } } }