Skip to content
9 changes: 7 additions & 2 deletions src/plugins/search/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,13 @@ export function init(config, vm) {
namespaceSuffix = matches[0];
}
}
paths.unshift(namespaceSuffix + '/');
} else {
if (
paths.indexOf(namespaceSuffix + '/') === -1 &&
paths.indexOf(namespaceSuffix + '/README') === -1
) {
paths.unshift(namespaceSuffix + '/');
}
} else if (paths.indexOf('/') === -1 && paths.indexOf('/README') === -1) {
paths.unshift('/');
}

Expand Down