Skip to content

Commit

Permalink
fix: Fix search error when exist translations documents (#1300)
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records authored Jul 22, 2020
1 parent 13d4232 commit b869019
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/plugins/search/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ export function init(config, vm) {
const len = paths.length;
let count = 0;

// Fix search error when exist translations documents
if (INDEXS !== null && !INDEXS[paths[0]]) {
INDEXS = {};
}

paths.forEach(path => {
if (INDEXS[path]) {
return count++;
Expand Down

1 comment on commit b869019

@vercel
Copy link

@vercel vercel bot commented on b869019 Jul 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.