Skip to content

Commit

Permalink
Display if no results are found
Browse files Browse the repository at this point in the history
  • Loading branch information
justyns committed Jul 24, 2024
1 parent e8432b5 commit 528f843
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/embeddings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,10 @@ export async function updateSearchPage() {
const pageLength = loadingText.length;
text = pageHeader + "\n\n";

if (results.length === 0) {
text += "No results found.\n\n";
}

for (const r of results) {
text += `## [[${r.page}]]\n`;
for (const child of r.children) {
Expand Down

0 comments on commit 528f843

Please sign in to comment.