Skip to content

Commit

Permalink
Merge pull request #435 from guardian/fix-showcase-check
Browse files Browse the repository at this point in the history
Prefer `.headOption` over `.head`
  • Loading branch information
davidfurey authored Dec 6, 2024
2 parents 4e1abf1 + f061a26 commit fc832e6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ object CapiModelEnrichment {
val hasShowcaseImage = for {
blocks <- content.blocks
main <- blocks.main
mainMedia = main.elements.head
mainMedia <- main.elements.headOption
imageTypeData <- mainMedia.imageTypeData
imageRole <- imageTypeData.role
} yield {
Expand Down

0 comments on commit fc832e6

Please sign in to comment.