Skip to content

Commit

Permalink
fix possible edge case in emoji search
Browse files Browse the repository at this point in the history
  • Loading branch information
TiltedToast committed Mar 1, 2024
1 parent acc6615 commit 9f103b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/emoji.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ export async function searchEmojis(message: Message) {
}

const emojiStrings = Array.from(
emojis.map((x) => x.toString().replace(":_:", `:${x.name}:` ?? ":_:"))
emojis.map((x) => x.toString().replace(":_:", x.name ? `:${x.name}:` : ":_:"))
);

const fuse = new Fuse(emojiStrings, {
Expand Down

0 comments on commit 9f103b8

Please sign in to comment.