diff options
author | MIYAGI Hikaru <hcmiya@users.noreply.github.com> | 2017-10-06 14:40:41 +0000 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-10-06 16:40:41 +0200 |
commit | 6f2d88dd28e84d236570bed4367d4a72ade0c404 (patch) | |
tree | 2c035937e1c9277489c36d775117c2aa38909788 /app/javascript | |
parent | daa59dd4546b810fe1d3f48e76c1f9f67dabad0f (diff) |
Fix error at emoji_compressed in Firefox ESR (#5241)
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/mastodon/features/emoji/emoji_compressed.js | 4 |
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); } }); |