From 6f2d88dd28e84d236570bed4367d4a72ade0c404 Mon Sep 17 00:00:00 2001 From: MIYAGI Hikaru Date: Fri, 6 Oct 2017 14:40:41 +0000 Subject: [PATCH] Fix error at emoji_compressed in Firefox ESR (#5241) --- app/javascript/mastodon/features/emoji/emoji_compressed.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/features/emoji/emoji_compressed.js b/app/javascript/mastodon/features/emoji/emoji_compressed.js index 3ed4dc82b9a..3bd89cf3be9 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); } });