about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/javascript/mastodon/features/emoji/emoji_compressed.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/emoji/emoji_compressed.js b/app/javascript/mastodon/features/emoji/emoji_compressed.js
index 3ed4dc82b..3bd89cf3b 100644
--- a/app/javascript/mastodon/features/emoji/emoji_compressed.js
+++ b/app/javascript/mastodon/features/emoji/emoji_compressed.js
@@ -54,7 +54,9 @@ Object.keys(emojiMap).forEach(key => {
   if (typeof shortcode === 'undefined') {
     emojisWithoutShortCodes.push(filenameData);
   } else {
-    shortCodesToEmojiData[shortcode] = shortCodesToEmojiData[shortcode] || [[]];
+    if (!Array.isArray(shortCodesToEmojiData[shortcode])) {
+      shortCodesToEmojiData[shortcode] = [[]];
+    }
     shortCodesToEmojiData[shortcode][0].push(filenameData);
   }
 });