Skip to content

fix: genIndex error for search #1933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jan 3, 2023
Prev Previous commit
Next Next commit
revert
  • Loading branch information
wangliang181230 committed Jan 3, 2023
commit b1df79d7e4d2a76adb68223bd3eb048fcca71e6c
4 changes: 2 additions & 2 deletions src/plugins/search/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ export function init(config, vm) {

const isExpired = localStorage.getItem(expireKey) < Date.now();

INDEXS = isExpired ? null : JSON.parse(localStorage.getItem(indexKey));
INDEXS = JSON.parse(localStorage.getItem(indexKey));

if (!INDEXS) {
if (isExpired) {
INDEXS = {};
} else if (!isAuto) {
return;
Expand Down