File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -445,29 +445,28 @@ export function getLogo(
445
445
tag ?: string ;
446
446
} = { }
447
447
) : ImageUrlInfo {
448
- let imgType ;
448
+ const imgType = ImageType . Logo ;
449
449
let imgTag ;
450
450
let itemId : string | null | undefined = item . Id ;
451
451
452
452
if ( tag ) {
453
- imgType = ImageType . Logo ;
454
453
imgTag = tag ;
455
454
} else if ( item . ImageTags ?. Logo ) {
456
- imgType = ImageType . Logo ;
457
455
imgTag = item . ImageTags . Logo ;
458
456
} else if ( item . ParentLogoImageTag && item . ParentLogoItemId ) {
459
- imgType = ImageType . Logo ;
460
457
imgTag = item . ParentLogoImageTag ;
461
458
itemId = item . ParentLogoItemId ;
462
459
}
463
460
464
461
return {
465
- url : getImageUrlWithSize ( itemId ?? '' , {
466
- width,
467
- quality,
468
- ratio
469
- } , imgType ) ,
462
+ url : isNil ( imgTag )
463
+ ? undefined
464
+ : getImageUrlWithSize ( itemId ?? '' , {
465
+ width,
466
+ quality,
467
+ ratio
468
+ } , imgType ) ,
470
469
blurhash :
471
- imgType && imgTag ? item . ImageBlurHashes ?. [ imgType ] ?. [ imgTag ] : undefined
470
+ imgTag ? item . ImageBlurHashes ?. [ imgType ] ?. [ imgTag ] : undefined
472
471
} ;
473
472
}
You can’t perform that action at this time.
0 commit comments