diff options
| author | Theo Browne <me@t3.gg> | 2025-02-14 22:16:04 -0800 |
|---|---|---|
| committer | Theo Browne <me@t3.gg> | 2025-02-14 22:16:04 -0800 |
| commit | 20477c010240155cb0d0cdb9ad5eb659ffb0373c (patch) | |
| tree | 14c04e24687f420c5b100da765c878c6e8358302 /src | |
| parent | 1518a4e5c88d78cf775c3b0cd68de931bd453137 (diff) | |
| download | unkagi-20477c010240155cb0d0cdb9ad5eb659ffb0373c.tar.xz unkagi-20477c010240155cb0d0cdb9ad5eb659ffb0373c.zip | |
Fix defaults
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main.ts b/src/main.ts index d42da13..f7d188d 100644 --- 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 |
