From 09582cb502228d2f4a6b3693bffbee6037c6e89f Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sun, 11 Sep 2022 20:02:34 +0200 Subject: [PATCH] limit to 10 items --- src/components/SearchResults.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SearchResults.vue b/src/components/SearchResults.vue index c5e9d660..32511b88 100644 --- a/src/components/SearchResults.vue +++ b/src/components/SearchResults.vue @@ -145,7 +145,7 @@ export default { if (!query) return; const searchHistory = JSON.parse(localStorage.getItem("search_history")) ?? []; if (!searchHistory.includes(query)) searchHistory.push(query); - if (searchHistory.length > 3) searchHistory.shift(); + if (searchHistory.length > 10) searchHistory.shift(); localStorage.setItem("search_history", JSON.stringify(searchHistory)); }, },