Skip to content

Commit

Permalink
Merge pull request #271 from 10up/fix/optional-chaining-image-component
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiankaegy authored Oct 25, 2023
2 parents f2609b0 + 41ff488 commit 83d93ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const Image = (props) => {
return <Spinner />;
}

const imageUrl = media?.media_details?.sizes[size]?.source_url ?? media?.source_url;
const imageUrl = media?.media_details?.sizes?.[size]?.source_url ?? media?.source_url;
const altText = media?.alt_text;

if (shouldDisplayFocalPointPicker) {
Expand Down

0 comments on commit 83d93ae

Please sign in to comment.