From f7e442cabb7475ae9c8a327efa1441694d1883c1 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Sat, 12 Aug 2023 13:03:45 +0200 Subject: [PATCH] fix(search): reset `lastSearch` variable if keywords are empty (#858) closes https://github.com/CaiJimmy/hugo-theme-stack/issues/832 --- assets/ts/search.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/ts/search.tsx b/assets/ts/search.tsx index 68db7b3..856b48d 100644 --- a/assets/ts/search.tsx +++ b/assets/ts/search.tsx @@ -227,6 +227,7 @@ class Search { Search.updateQueryString(keywords, true); if (keywords === '') { + lastSearch = ''; return this.clear(); }