Skip to content

Commit 9d3cc89

Browse files
committed
fix(search): crash when not content, fixed #68
1 parent 50f5fc2 commit 9d3cc89

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/plugins/search.js

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ const genIndex = function (path, content = '') {
7676
slug = `#/${path}#${id}`.replace(/\/+/, '/')
7777
INDEXS[slug] = { slug, title: text, body: '' }
7878
} else {
79+
if (!slug) return
7980
// other html tag
8081
if (!INDEXS[slug]) {
8182
INDEXS[slug] = {}

0 commit comments

Comments
 (0)