do not parse post emojis if post.emoji is undefined
This commit is contained in:
		
							parent
							
								
									abb06a40bc
								
							
						
					
					
						commit
						0d39ddd3d2
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		|  | @ -44,9 +44,11 @@ export async function parsePost(data, ancestor_count) { | ||||||
|     post.visibility = data.visibility; |     post.visibility = data.visibility; | ||||||
| 
 | 
 | ||||||
|     post.emojis = []; |     post.emojis = []; | ||||||
|     data.emojis.forEach(emoji => { |     if (post.emojis) { | ||||||
|         post.emojis[emoji.shortcode] = parseEmoji(emoji.shortcode, emoji.url); |         data.emojis.forEach(emoji => { | ||||||
|     }); |             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…
	
	Add table
		Add a link
		
	
		Reference in a new issue