mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
Add undefined check for postcontent in search plugin
This commit is contained in:
parent
0e54ea1177
commit
4419611238
@ -129,7 +129,7 @@ export function search(query) {
|
||||
start = indexContent < 11 ? 0 : indexContent - 10
|
||||
end = start === 0 ? 70 : indexContent + keyword.length + 60
|
||||
|
||||
if (end > postContent.length) {
|
||||
if (postContent && end > postContent.length) {
|
||||
end = postContent.length
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user