Fix: Considering the scenario when download does not have a data-tags attribute
This commit is contained in:
parent
59ce4cd913
commit
daa4770c37
1 changed files with 1 additions and 1 deletions
|
|
@ -353,7 +353,7 @@ function filterResults() {
|
|||
// exact tag match re-order
|
||||
if (downloadsSearch.searchTerm !== null && downloadsSearch.searchTerm !== undefined) {
|
||||
let searched = downloadsSearch.searchTerm.toLowerCase();
|
||||
let tags = download.getAttribute("data-tags").split(",");
|
||||
let tags = download.dataset.tags?.split(",") || [];
|
||||
if (searched !== "" && tags.indexOf(searched) >= 0) {
|
||||
let parent = download.parentElement;
|
||||
parent.removeChild(download);
|
||||
|
|
|
|||
Loading…
Reference in a new issue