Skip to content

Commit

Permalink
fix(images): not always returning logos in getLogo
Browse files Browse the repository at this point in the history
Signed-off-by: Fernando Fernández <[email protected]>
  • Loading branch information
ferferga committed Jan 27, 2025
1 parent 6c48bed commit 8540442
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions frontend/src/utils/images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,18 +445,15 @@ export function getLogo(
tag?: string;
} = {}
): ImageUrlInfo {
let imgType;
const imgType = ImageType.Logo;
let imgTag;
let itemId: string | null | undefined = item.Id;

if (tag) {
imgType = ImageType.Logo;
imgTag = tag;
} else if (item.ImageTags?.Logo) {
imgType = ImageType.Logo;
imgTag = item.ImageTags.Logo;
} else if (item.ParentLogoImageTag && item.ParentLogoItemId) {
imgType = ImageType.Logo;
imgTag = item.ParentLogoImageTag;
itemId = item.ParentLogoItemId;
}
Expand All @@ -468,6 +465,6 @@ export function getLogo(
ratio
}, imgType),
blurhash:
imgType && imgTag ? item.ImageBlurHashes?.[imgType]?.[imgTag] : undefined
imgTag ? item.ImageBlurHashes?.[imgType]?.[imgTag] : undefined
};
}

0 comments on commit 8540442

Please sign in to comment.