Display default image for channel thumbnail on error

This commit is contained in:
Franco Montenegro 2021-01-28 15:03:32 -03:00 committed by Sean Yesmunt
parent b27395607c
commit 77d90b807e

View file

@ -72,7 +72,8 @@ function ChannelThumbnail(props: Props) {
<img
alt={__('Channel profile picture')}
className="channel-thumbnail__default"
src={thumbnailPreview || Gerbil}
src={!thumbError && thumbnailPreview ? thumbnailPreview : Gerbil}
onError={() => setThumbError(true)} // if thumb fails (including due to https replace, show gerbil.
/>
)}
{showThumb && (