Fix defaults

This commit is contained in:
Theo Browne 2025-02-14 22:16:04 -08:00
parent 1518a4e5c8
commit 20477c0102
No known key found for this signature in database
GPG Key ID: BDDADD971F49875D

View File

@ -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