Skip to content

Commit

Permalink
Fix null tags
Browse files Browse the repository at this point in the history
  • Loading branch information
BernatBC committed Feb 19, 2024
1 parent df72eee commit 5d657f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/scripts/pages/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ window.addEventListener('DOMContentLoaded', () => {
function adaptTags() {
const tags = value.item.tags;
let string = '';
tags.forEach((t) => {string += '<li class="rounded"><a href="/tags/' + t.toLowerCase() + '/" class="btn btn-sm btn-info">' + t + "</a></li>"});
if (tags) tags.forEach((t) => {string += '<li class="rounded"><a href="/tags/' + t.toLowerCase() + '/" class="btn btn-sm btn-info">' + t + "</a></li>"});
return string;
}

Expand Down

0 comments on commit 5d657f9

Please sign in to comment.