]> cat aescling's git repositories - mastodon.git/commitdiff
Fix error at emoji_compressed in Firefox ESR (#5241)
authorMIYAGI Hikaru <hcmiya@users.noreply.github.com>
Fri, 6 Oct 2017 14:40:41 +0000 (14:40 +0000)
committerEugen Rochko <eugen@zeonfederated.com>
Fri, 6 Oct 2017 14:40:41 +0000 (16:40 +0200)
app/javascript/mastodon/features/emoji/emoji_compressed.js

index 3ed4dc82b9a7c9bc5c2cb40f917eb8ff8cdbc32d..3bd89cf3be9d3718a5c6318dbecc63c678b0443d 100644 (file)
@@ -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);
   }
 });