fix(search): crash when not content, fixed #68
This commit is contained in:
parent
50f5fc2b22
commit
9d3cc89aa9
1 changed files with 1 additions and 0 deletions
|
|
@ -76,6 +76,7 @@ const genIndex = function (path, content = '') {
|
||||||
slug = `#/${path}#${id}`.replace(/\/+/, '/')
|
slug = `#/${path}#${id}`.replace(/\/+/, '/')
|
||||||
INDEXS[slug] = { slug, title: text, body: '' }
|
INDEXS[slug] = { slug, title: text, body: '' }
|
||||||
} else {
|
} else {
|
||||||
|
if (!slug) return
|
||||||
// other html tag
|
// other html tag
|
||||||
if (!INDEXS[slug]) {
|
if (!INDEXS[slug]) {
|
||||||
INDEXS[slug] = {}
|
INDEXS[slug] = {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue