mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Fixed empty search result causing UI crash
This commit is contained in:
parent
df03c47ac1
commit
c429b90c11
1 changed files with 2 additions and 2 deletions
|
@ -290,14 +290,14 @@ function SearchResultBox() {
|
|||
if (indexComplete && searchValue) {
|
||||
searchResults = searchIndex.search(searchValue);
|
||||
console.log(searchResults);
|
||||
filteredPosts = searchResults.map((d) => {
|
||||
filteredPosts = searchResults?.map((d) => {
|
||||
return {
|
||||
id: d?.id,
|
||||
excerpt: d?.excerpt,
|
||||
title: d?.title,
|
||||
slug: d?.slug
|
||||
};
|
||||
});
|
||||
}) || [];
|
||||
console.log(filteredPosts);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue