File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -166,13 +166,14 @@ class CardResource < ApplicationResource # rubocop:disable Metrics/ClassLength
166
166
def images ( id , face_index = nil )
167
167
url_prefix = Rails . configuration . x . printing_images . nrdb_classic_prefix
168
168
face_suffix = "-#{ face_index } " unless face_index . nil?
169
+ has_narrative_image = :narrative_text . presence && !face_index . nil?
169
170
{
170
171
'nrdb_classic' => {
171
172
'tiny' => "#{ url_prefix } /tiny/#{ id } #{ face_suffix } .jpg" ,
172
173
'small' => "#{ url_prefix } /small/#{ id } #{ face_suffix } .jpg" ,
173
174
'medium' => "#{ url_prefix } /medium/#{ id } #{ face_suffix } .jpg" ,
174
175
'large' => "#{ url_prefix } /large/#{ id } #{ face_suffix } .jpg" ,
175
- 'narrative' => "#{ url_prefix } /large/#{ id } #{ face_suffix } -narrative.jpg"
176
+ 'narrative' => has_narrative_image ? "#{ url_prefix } /large/#{ id } #{ face_suffix } -narrative.jpg" : nil
176
177
}
177
178
}
178
179
end
You can’t perform that action at this time.
0 commit comments