From 15a91d10e12e1bbdc080a48e1a5fa0821d62b15a Mon Sep 17 00:00:00 2001 From: xPumaa <35280763+xPumaa@users.noreply.github.com> Date: Wed, 9 Aug 2023 11:28:46 +0200 Subject: [PATCH 1/3] check for undefined --- src/components/Pronouns.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Pronouns.jsx b/src/components/Pronouns.jsx index 783ce5d..3020ded 100644 --- a/src/components/Pronouns.jsx +++ b/src/components/Pronouns.jsx @@ -18,7 +18,7 @@ function getDiscordPronouns(userId, guildId) { }) } else { const discordPronouns = getGuildMemberProfile(userId, guildId)?.pronouns || userProfile?.pronouns - return discordPronouns.replace(/[\s\u200b]+/g, ' ').trim() + return discordPronouns ? discordPronouns.replace(/[\s\u200b]+/g, ' ').trim() : discordPronouns // check for undefined } } From 33ddcf345fd6c9c6bfa889507fa8babe8f35ffe7 Mon Sep 17 00:00:00 2001 From: xPumaa <35280763+xpumaa@users.noreply.github.com> Date: Wed, 9 Aug 2023 11:40:43 +0200 Subject: [PATCH 2/3] inc version --- manifest.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 069407b..779a837 100644 --- a/manifest.json +++ b/manifest.json @@ -9,7 +9,7 @@ "github": "Penguin-Spy" }, "source": "https://github.com/Penguin-Spy/replugged-pronoundb", - "version": "1.3.3", + "version": "1.3.4", "updater": { "type": "store", "id": "dev.penguinspy.pronoundb" diff --git a/package.json b/package.json index 1f8fa65..3c10621 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "replugged-pronoundb", - "version": "1.3.3", + "version": "1.3.4", "description": "Shows users' PronounDB pronouns in chat so that you don't accidentally misgender people.", "author": "Penguin_Spy", "scripts": { From 0f188ca7b6f7f183a6780852764bb7028ac14e35 Mon Sep 17 00:00:00 2001 From: xPumaa <35280763+xPumaa@users.noreply.github.com> Date: Thu, 10 Aug 2023 01:10:56 +0200 Subject: [PATCH 3/3] easier way Co-authored-by: Albert Portnoy --- src/components/Pronouns.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Pronouns.jsx b/src/components/Pronouns.jsx index 3020ded..170cf78 100644 --- a/src/components/Pronouns.jsx +++ b/src/components/Pronouns.jsx @@ -18,7 +18,7 @@ function getDiscordPronouns(userId, guildId) { }) } else { const discordPronouns = getGuildMemberProfile(userId, guildId)?.pronouns || userProfile?.pronouns - return discordPronouns ? discordPronouns.replace(/[\s\u200b]+/g, ' ').trim() : discordPronouns // check for undefined + return discordPronouns?.replace(/[\s\u200b]+/g, ' ').trim() } }