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(
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 }
463460
464461 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 ) ,
470469 blurhash :
471- imgType && imgTag ? item . ImageBlurHashes ?. [ imgType ] ?. [ imgTag ] : undefined
470+ imgTag ? item . ImageBlurHashes ?. [ imgType ] ?. [ imgTag ] : undefined
472471 } ;
473472}
You can’t perform that action at this time.
0 commit comments