Add undefined check for postcontent in search plugin

This commit is contained in:
Moritz Schramm
2020-02-03 12:44:51 +05:30
committed by Anix
parent 0e54ea1177
commit 4419611238
+1 -1
View File
@@ -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
}