Skip to content

Commit

Permalink
fix: Cannot read property 'startsWith' of undefined (#1358)
Browse files Browse the repository at this point in the history
* fix: Cannot read property 'startsWith' of undefined

* Update search.js

* update

* Update search.js
  • Loading branch information
sy-records committed Aug 28, 2020
1 parent 2100fc3 commit 9351729
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/search/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

1 comment on commit 9351729

@vercel
Copy link

@vercel vercel bot commented on 9351729 Aug 28, 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.