From 19dfa571da4058883796bf94a3fbed9dbfef08b1 Mon Sep 17 00:00:00 2001 From: InfiniteTF Date: Wed, 9 Sep 2020 00:37:19 +0200 Subject: [PATCH] Fix erroneous pending thumbnail on wall items (#784) --- ui/v2.5/src/components/Wall/WallItem.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/v2.5/src/components/Wall/WallItem.tsx b/ui/v2.5/src/components/Wall/WallItem.tsx index 0abdf64cb..8918ee488 100644 --- a/ui/v2.5/src/components/Wall/WallItem.tsx +++ b/ui/v2.5/src/components/Wall/WallItem.tsx @@ -69,7 +69,10 @@ const Preview: React.FC<{ className={cx("wall-item-media", { "wall-item-preview": previewType !== "video", })} - onError={() => setIsMissing(true)} + onError={(error: React.SyntheticEvent) => { + // Error code 4 indicates media not found or unsupported + setIsMissing(error.currentTarget.error?.code === 4); + }} ref={videoElement} /> );