diff --git a/horizontal-chat/script.js b/horizontal-chat/script.js index 7fb2f12..389cd99 100644 --- a/horizontal-chat/script.js +++ b/horizontal-chat/script.js @@ -1057,14 +1057,11 @@ async function GetPronouns(platform, username) { console.debug(`No pronouns found for ${username}. Retrieving from alejo.io.`) const response = await client.getUserPronouns(platform, username); const userFound = response.pronoun.userFound; - const pronouns = `${response.pronoun.pronounSubject}/${response.pronoun.pronounObject}`; + const pronouns = userFound ? `${response.pronoun.pronounSubject}/${response.pronoun.pronounObject}` : ''; pronounMap.set(username, pronouns); - if (userFound) - return pronouns; - else - return ''; + return pronouns; } } diff --git a/multichat-overlay/script.js b/multichat-overlay/script.js index 76e7628..5e56c0d 100644 --- a/multichat-overlay/script.js +++ b/multichat-overlay/script.js @@ -1811,14 +1811,11 @@ async function GetPronouns(platform, username) { console.debug(`No pronouns found for ${username}. Retrieving from alejo.io.`) const response = await client.getUserPronouns(platform, username); const userFound = response.pronoun.userFound; - const pronouns = `${response.pronoun.pronounSubject}/${response.pronoun.pronounObject}`; + const pronouns = userFound ? `${response.pronoun.pronounSubject}/${response.pronoun.pronounObject}` : ''; pronounMap.set(username, pronouns); - if (userFound) - return pronouns; - else - return ''; + return pronouns; } }