From addad7bc067c1f9d354572f09196178c7480facd Mon Sep 17 00:00:00 2001 From: Nekromateion <43814053+Nekromateion@users.noreply.github.com> Date: Thu, 9 Jan 2025 00:44:59 +0100 Subject: [PATCH] Fix freeze caused by duplicate entries when searching avatar favs (#1067) --- html/src/app.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/html/src/app.js b/html/src/app.js index c2281a98..b8954d17 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -21801,7 +21801,9 @@ 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); + } } } } @@ -21815,7 +21817,9 @@ 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); + } } }