mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 05:50:35 +03:00
Fixed empty search result causing UI crash
This commit is contained in:
parent
df03c47ac1
commit
c429b90c11
@ -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…
Reference in New Issue
Block a user