Skip to content

Commit

Permalink
fix: Fix search error when exist translations documents
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records committed Jul 22, 2020
1 parent 13d4232 commit c25c770
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

0 comments on commit c25c770

Please sign in to comment.