From 2ce4d9f0d8b5e76c9fa484a53cd1ed8004783a99 Mon Sep 17 00:00:00 2001 From: Still Hsu Date: Thu, 3 Jun 2021 20:05:43 +0900 Subject: [PATCH] Fix exception when scene preview is unavailable (#1477) --- ui/v2.5/src/components/Scenes/SceneCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/v2.5/src/components/Scenes/SceneCard.tsx b/ui/v2.5/src/components/Scenes/SceneCard.tsx index d09697cac..338fe54f2 100644 --- a/ui/v2.5/src/components/Scenes/SceneCard.tsx +++ b/ui/v2.5/src/components/Scenes/SceneCard.tsx @@ -35,7 +35,7 @@ export const ScenePreview: React.FC = ({ entries.forEach((entry) => { if (entry.intersectionRatio > 0) // Catch is necessary due to DOMException if user hovers before clicking on page - videoEl.current?.play().catch(() => {}); + videoEl.current?.play()?.catch(() => {}); else videoEl.current?.pause(); }); });