Restyle docs search results

This commit is contained in:
Richard Feldman 2024-11-29 02:18:20 -05:00
parent b456ee9592
commit aabef9dd48
No known key found for this signature in database
GPG key ID: DAC334802F365236
3 changed files with 49 additions and 49 deletions

View file

@ -43,13 +43,13 @@
.textContent.toLowerCase();
const entrySignature = entry
.querySelector(".type-ahead-signature")
.textContent.toLowerCase()
.replace(/\s+/g, "");
?.textContent?.toLowerCase()
?.replace(/\s+/g, "");
if (
totalResults < 5 &&
(entryName.includes(text) ||
entrySignature.includes(text.replace(/\s+/g, "")))
entrySignature?.includes(text.replace(/\s+/g, "")))
) {
totalResults++;
entry.classList.remove("hidden");