Skip to content

Commit 765ec3c

Browse files
committed
fetch safety
1 parent 8cd5409 commit 765ec3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/views/content/list/_cards.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="js-content-cards-list">
22
<% content_list.each.with_index do |content, i| %>
33
<%
4-
content_image = @random_image_including_private_pool_cache[[content.page_type, content.id]]
4+
content_image = @random_image_including_private_pool_cache.fetch([content.page_type, content.id], [])
55
.sample
66
.try(:src, :medium) || asset_path("card-headers/#{content.page_type.downcase.pluralize}.jpg")
77
%>

0 commit comments

Comments
 (0)