search

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 20477c010240155cb0d0cdb9ad5eb659ffb0373c
parent 1518a4e5c88d78cf775c3b0cd68de931bd453137
Author: Theo Browne <me@t3.gg>
Date:   Fri, 14 Feb 2025 22:16:04 -0800

Fix defaults

Diffstat:
Msrc/main.ts | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/main.ts b/src/main.ts @@ -8,9 +8,8 @@ function getBangredirectUrl() { if (!query) return null; const match = query.match(/!([a-z]+)/i); - if (!match) return null; - const bangCandidate = match[1].toLowerCase(); + const bangCandidate = match?.[1]?.toLowerCase(); const selectedBang = bangs.find((b) => b.t === bangCandidate) ?? defaultBang; // Remove the first bang from the query