fix: Cannot read property 'startsWith' of undefined (#1358)

* fix: Cannot read property 'startsWith' of undefined

* Update search.js

* update

* Update search.js
This commit is contained in:
沈唁
2020-08-28 09:05:47 +08:00
committed by GitHub
parent 2100fc318b
commit 9351729634
+1 -1
View File
@@ -203,7 +203,7 @@ export function init(config, vm) {
let namespaceSuffix = '';
// only in auto mode
if (isAuto && config.pathNamespaces) {
if (paths.length && isAuto && config.pathNamespaces) {
const path = paths[0];
if (Array.isArray(config.pathNamespaces)) {