mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
fix(search): crash when not content, fixed #68
This commit is contained in:
parent
50f5fc2b22
commit
9d3cc89aa9
@ -76,6 +76,7 @@ const genIndex = function (path, content = '') {
|
||||
slug = `#/${path}#${id}`.replace(/\/+/, '/')
|
||||
INDEXS[slug] = { slug, title: text, body: '' }
|
||||
} else {
|
||||
if (!slug) return
|
||||
// other html tag
|
||||
if (!INDEXS[slug]) {
|
||||
INDEXS[slug] = {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user