fix: check

This commit is contained in:
Cory Dransfeldt 2024-09-18 09:17:41 -07:00
parent ead84a41ae
commit 870c40cb46
No known key found for this signature in database
3 changed files with 13 additions and 9 deletions

View file

@ -35,7 +35,11 @@ permalink: /search.html
// Clear the results when input is empty
renderSearchResults([])
} else {
if (query.length > 1 && window?.umami) umami.trackEvent('Search', { query: query })
if (query.length > 1) {
try {
umami.trackEvent('Search', { query: query })
} catch (err) {}
}
renderSearchResults(results, query)
}
})