mirror of
https://github.com/wahyd4/docsify.git
synced 2026-08-09 05:16:06 +10:00
Add undefined check for postcontent in search plugin
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user