Skip to content

Commit da410ff

Browse files
committed
fix(images): not always returning logos in getLogo
Signed-off-by: Fernando Fernández <ferferga@hotmail.com>
1 parent 6c48bed commit da410ff

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

frontend/src/utils/images.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -445,18 +445,15 @@ export function getLogo(
445445
tag?: string;
446446
} = {}
447447
): ImageUrlInfo {
448-
let imgType;
448+
const imgType = ImageType.Logo;
449449
let imgTag;
450450
let itemId: string | null | undefined = item.Id;
451451

452452
if (tag) {
453-
imgType = ImageType.Logo;
454453
imgTag = tag;
455454
} else if (item.ImageTags?.Logo) {
456-
imgType = ImageType.Logo;
457455
imgTag = item.ImageTags.Logo;
458456
} else if (item.ParentLogoImageTag && item.ParentLogoItemId) {
459-
imgType = ImageType.Logo;
460457
imgTag = item.ParentLogoImageTag;
461458
itemId = item.ParentLogoItemId;
462459
}
@@ -468,6 +465,6 @@ export function getLogo(
468465
ratio
469466
}, imgType),
470467
blurhash:
471-
imgType && imgTag ? item.ImageBlurHashes?.[imgType]?.[imgTag] : undefined
468+
imgTag ? item.ImageBlurHashes?.[imgType]?.[imgTag] : undefined
472469
};
473470
}

0 commit comments

Comments
 (0)