Skip to content

Commit

Permalink
Merge pull request #774 from helsingborg-stad/fix/get-icon-background…
Browse files Browse the repository at this point in the history
…-view-error

fix: get icon view error
  • Loading branch information
NiclasNorin authored Jan 16, 2025
2 parents bf548f3 + 3224cd1 commit 45e49b7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
'icon' => $post->getIcon()->getIcon(),
'color' => 'white',
] : null,
'iconBackgroundColor' => $post->getIcon()->getCustomColor(),
'iconBackgroundColor' => $post->getIcon() ? $post->getIcon()->getCustomColor() : null,
])
@includeWhen(
!empty($post->callToActionItems['floating']['icon']),
Expand Down
2 changes: 1 addition & 1 deletion source/php/Module/Posts/views/partials/post/card.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
'icon' => $post->getIcon()->getIcon(),
'color' => 'white',
] : null,
'iconBackgroundColor' => $post->getIcon()->getCustomColor(),
'iconBackgroundColor' => $post->getIcon() ? $post->getIcon()->getCustomColor() : null,
])
@slot('aboveContent')
@includeWhen(!empty($post->readingTime), 'partials.read-time')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
'icon' => $post->getIcon()->getIcon(),
'color' => 'white',
] : null,
'iconBackgroundColor' => $post->getIcon()->getCustomColor(),
'iconBackgroundColor' => $post->getIcon() ? $post->getIcon()->getCustomColor() : null,
'hasPlaceholder' => $post->hasPlaceholderImage,
'classList' => array_merge($classList ?? []),
])
Expand Down

0 comments on commit 45e49b7

Please sign in to comment.