do not parse post emojis if post.emoji is undefined
This commit is contained in:
parent
abb06a40bc
commit
0d39ddd3d2
|
@ -44,9 +44,11 @@ export async function parsePost(data, ancestor_count) {
|
||||||
post.visibility = data.visibility;
|
post.visibility = data.visibility;
|
||||||
|
|
||||||
post.emojis = [];
|
post.emojis = [];
|
||||||
|
if (post.emojis) {
|
||||||
data.emojis.forEach(emoji => {
|
data.emojis.forEach(emoji => {
|
||||||
post.emojis[emoji.shortcode] = parseEmoji(emoji.shortcode, emoji.url);
|
post.emojis[emoji.shortcode] = parseEmoji(emoji.shortcode, emoji.url);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (data.reactions) post.reactions = parseReactions(data.reactions);
|
if (data.reactions) post.reactions = parseReactions(data.reactions);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue