diff --git a/src/plugins/search.js b/src/plugins/search.js index 3e9a5ee82..17aff3409 100644 --- a/src/plugins/search.js +++ b/src/plugins/search.js @@ -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] = {}