From ffbc5199660a381d39f3ff6b51f25a8faad2ea58 Mon Sep 17 00:00:00 2001 From: Nekromateion <43814053+Nekromateion@users.noreply.github.com> Date: Tue, 26 Nov 2024 05:36:10 +0100 Subject: [PATCH] Fix error when searching through favs (#986) Fix for an error that can occur when searching through favs resulting in the entire application freezing. --- html/src/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/src/app.js b/html/src/app.js index aa770cc6..71d28e1a 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -20593,7 +20593,7 @@ speechSynthesis.getVoices(); ref.name.toLowerCase().includes(search) || ref.authorName.toLowerCase().includes(search) ) { - results.push(ref); + if (!results.some(r => r.id == ref.id)) results.push(ref); } } } @@ -20607,7 +20607,7 @@ speechSynthesis.getVoices(); ref.name.toLowerCase().includes(search) || ref.authorName.toLowerCase().includes(search) ) { - results.push(ref); + if (!results.some(r => r.id == ref.id)) results.push(ref); } }