Skip to content

Commit

Permalink
Fix the rendering of the caption when there is no data
Browse files Browse the repository at this point in the history
  • Loading branch information
cihanandac committed Feb 6, 2024
1 parent 1a5c478 commit 9d8564f
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,15 @@ export const View = ({ data, detached }) => {
>
{image}
</UniversalLink>
<p
id="photo-credit"
className="photo-credit-copytight"
dangerouslySetInnerHTML={{ __html: data.caption?.data }}
/>
{data.caption?.data ? (
<p
id="photo-credit"
className="photo-credit-copytight"
dangerouslySetInnerHTML={{ __html: data.caption.data }}
/>
) : (
''
)}
</div>
);
} else {
Expand Down

0 comments on commit 9d8564f

Please sign in to comment.