Skip to content

Commit b869019

Browse files
authored
fix: Fix search error when exist translations documents (#1300)
1 parent 13d4232 commit b869019

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/plugins/search/search.js

+5
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,11 @@ export function init(config, vm) {
213213
const len = paths.length;
214214
let count = 0;
215215

216+
// Fix search error when exist translations documents
217+
if (INDEXS !== null && !INDEXS[paths[0]]) {
218+
INDEXS = {};
219+
}
220+
216221
paths.forEach(path => {
217222
if (INDEXS[path]) {
218223
return count++;

0 commit comments

Comments
 (0)