Fix the splice again...

`.splice(0, 4)` returns the first 4 entries. Therefore we need to reasign `newSearchSuggestions[1]`
This commit is contained in:
Flo2410 2024-01-28 20:07:14 +00:00
parent d7fd48b5ad
commit 9bc86c488a
No known key found for this signature in database
GPG Key ID: 8ECB00AC5216DC7F

View File

@ -132,7 +132,7 @@ export default function QuickLaunch({
if (newSearchSuggestions) {
// Restrict the searchSuggestion to 4 entries
if (newSearchSuggestions[1].length > 4) {
newSearchSuggestions[1].splice(0, 4);
newSearchSuggestions[1] = newSearchSuggestions[1].splice(0, 4);
}
// Save the new search suggestions in their state.