mirror of
https://github.com/zhigang1992/docsify.git
synced 2026-04-17 22:44:25 +08:00
fix(search): crash when not content, fixed #68
This commit is contained in:
@@ -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] = {}
|
||||
|
||||
Reference in New Issue
Block a user