Remove intermediary arrays when creating hash maps from results (#9291)
This commit is contained in:
parent
367ad21995
commit
8069fd636b
11 changed files with 20 additions and 20 deletions
|
@ -128,9 +128,9 @@ class Formatter
|
|||
return html if emojis.empty?
|
||||
|
||||
emoji_map = if animate
|
||||
emojis.map { |e| [e.shortcode, full_asset_url(e.image.url)] }.to_h
|
||||
emojis.each_with_object({}) { |e, h| h[e.shortcode] = full_asset_url(e.image.url) }
|
||||
else
|
||||
emojis.map { |e| [e.shortcode, full_asset_url(e.image.url(:static))] }.to_h
|
||||
emojis.each_with_object({}) { |e, h| h[e.shortcode] = full_asset_url(e.image.url(:static)) }
|
||||
end
|
||||
|
||||
i = -1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue