Fix state filter removing video cards.

master
voussoir 2022-01-17 15:50:33 -08:00
parent 0239ae6b76
commit 134bcb5a87
No known key found for this signature in database
GPG Key ID: 5F7554F8C26DACCB
1 changed files with 2 additions and 2 deletions

View File

@ -339,12 +339,12 @@ function filter_video_cards(search_term)
video_card_list.classList.add("hidden");
const search_term_lower = search_term.toLocaleLowerCase();
const state_class = "video_card_" + STATE;
const video_cards = Array.from(video_card_list.getElementsByClassName("video_card"))
const video_cards = Array.from(video_card_list.getElementsByClassName("video_card"));
video_cards.forEach(function(video_card)
{
if (STATE && !video_card.classList.contains(state_class))
{
video_cards.removeChild(video_card);
video_card_list.removeChild(video_card);
return;
}
const title_lower = video_card.getElementsByClassName("video_title")[0].innerText.toLocaleLowerCase();