Skip to content

Commit

Permalink
Fix scene card for scenes without images (#573)
Browse files Browse the repository at this point in the history
  • Loading branch information
InfiniteStash authored Dec 22, 2022
1 parent 8cdbcc0 commit dda15e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/utils/transforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export const getImage = (
return images?.[0]?.url ?? "";
};

export const imageType = (image: ImageFragment) => {
if (image.height > image.width) {
export const imageType = (image?: ImageFragment) => {
if (image && image.height > image.width) {
return `vertical-img`;
} else {
return `horizontal-img`;
Expand Down

0 comments on commit dda15e4

Please sign in to comment.