Skip to content

Commit

Permalink
Make alias search being case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
Curetix committed May 26, 2023
1 parent e920452 commit 19c43c1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/utils/cloudflare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,12 @@ export const filteredAliasesAtom = atom<Alias[]>((get) => {
.filter((r) => r.matchers[0].type === "literal" && r.actions[0].type === "forward")
.map((r) => new Alias(r))
.filter((r) => !get(ruleFilterAtom) || !r.isExternal)
.filter((r) => search === "" || r.name.includes(search) || r.address.includes(search));
.filter(
(r) =>
search === "" ||
r.name.toLowerCase().includes(search.toLowerCase()) ||
r.address.toLowerCase().includes(search.toLowerCase()),
);
});

export const [, createEmailRuleAtom] = atomsWithMutation(
Expand Down

0 comments on commit 19c43c1

Please sign in to comment.