Fix the splice again...
`.splice(0, 4)` returns the first 4 entries. Therefore we need to reasign `newSearchSuggestions[1]`
This commit is contained in:
parent
d7fd48b5ad
commit
9bc86c488a
@ -132,7 +132,7 @@ export default function QuickLaunch({
|
|||||||
if (newSearchSuggestions) {
|
if (newSearchSuggestions) {
|
||||||
// Restrict the searchSuggestion to 4 entries
|
// Restrict the searchSuggestion to 4 entries
|
||||||
if (newSearchSuggestions[1].length > 4) {
|
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.
|
// Save the new search suggestions in their state.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user