Skip to content

Commit

Permalink
fix: check if the taxonomies exist before rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed May 13, 2023
1 parent c4e04b8 commit 6f6dd63
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion assets/search/js/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ export default class Renderer {
let v = ''

for (const key of params.taxonomyKeys) {
for (const name of page[key]) {
const terms = page[key]
if (!terms) {
continue
}
for (const name of terms) {
v += `<span class="search-result-taxonomy">${name}</span>`
}
}
Expand Down

0 comments on commit 6f6dd63

Please sign in to comment.