From d63face5cd2c1c459e54135d32c1e0789d39e057 Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 26 Oct 2023 18:22:03 +0300 Subject: [PATCH] fix error --- files/assets/js/emoji_modal.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/files/assets/js/emoji_modal.js b/files/assets/js/emoji_modal.js index f947b3ea4..da58bb2ab 100644 --- a/files/assets/js/emoji_modal.js +++ b/files/assets/js/emoji_modal.js @@ -177,9 +177,10 @@ function fetchEmojis() { if (!emoji.author_username.endsWith(' user')) { emojisSearchDictionary.updateTag(`@${emoji.author_username.toLowerCase()}`, emoji.name); - emojisSearchDictionary.updateTag(`@${emoji.author_original_username.toLowerCase()}`, emoji.name); - try {emojisSearchDictionary.updateTag(`@${emoji.author_prelock_username.toLowerCase()}`, emoji.name);} - catch (e) {console.log(emoji.author_username)} + if (emoji.author_original_username != emoji.author_username) + emojisSearchDictionary.updateTag(`@${emoji.author_original_username.toLowerCase()}`, emoji.name); + if (emoji.author_prelock_username !== null) + emojisSearchDictionary.updateTag(`@${emoji.author_prelock_username.toLowerCase()}`, emoji.name); } if (emoji.tags instanceof Array)