fix(search): reset lastSearch variable if keywords are empty (#858)

closes https://github.com/CaiJimmy/hugo-theme-stack/issues/832
This commit is contained in:
Jimmy Cai 2023-08-12 13:03:45 +02:00 committed by GitHub
parent cabaf06ef2
commit f7e442cabb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -227,6 +227,7 @@ class Search {
Search.updateQueryString(keywords, true);
if (keywords === '') {
lastSearch = '';
return this.clear();
}