mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed issue where find-function says it found one element when it didnt
This commit is contained in:
@@ -1559,8 +1559,14 @@ addListener("submit", "#find_form", function(event){
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
document.getElementById("num_found").innerText = found_array_index + 1;
|
if(found_array.length == 0) {
|
||||||
document.getElementById("of_total_found").innerText = found_array.length;
|
document.getElementById("num_found").innerText = 0;
|
||||||
|
document.getElementById("of_total_found").innerText = found_array.length;
|
||||||
|
} else {
|
||||||
|
document.getElementById("num_found").innerText = found_array_index + 1;
|
||||||
|
document.getElementById("of_total_found").innerText = found_array.length;
|
||||||
|
}
|
||||||
|
|
||||||
if(found_array.length > 0 && found_array[found_array_index] != full_playlist.length - 1){
|
if(found_array.length > 0 && found_array[found_array_index] != full_playlist.length - 1){
|
||||||
Helper.removeClass(".highlight", "highlight");
|
Helper.removeClass(".highlight", "highlight");
|
||||||
var jump_to_page = Math.floor(found_array[found_array_index] / List.can_fit);
|
var jump_to_page = Math.floor(found_array[found_array_index] / List.can_fit);
|
||||||
|
|||||||
Reference in New Issue
Block a user