A fast, local-first "redirection engine" for !bang users with a few extra features ^-^

Fix defaults

Theo Browne 20477c01 1518a4e5

Changed files
+1 -2
src
+1 -2
src/main.ts
···
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