From 2e0cf0bca90b3561cd932e3b53ec93772bbcde31 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 16 Sep 2021 06:49:19 +0200 Subject: [PATCH] Fix video play lightbox autostart (#1920) * disable sending on enter while composing Fixes #1899 #1497 * ask confirmation before deleting account * fix app start delete db when passowrd error * fix double dialog issue with delete account * fixup login screen * Fix video autoplay start when not initialized Relates #1904 --- ts/components/Lightbox.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/components/Lightbox.tsx b/ts/components/Lightbox.tsx index 702c03a22..edb441d6d 100644 --- a/ts/components/Lightbox.tsx +++ b/ts/components/Lightbox.tsx @@ -235,8 +235,8 @@ export const LightboxObject = ({ const isVideoTypeSupported = GoogleChrome.isVideoTypeSupported(contentType); if (isVideoTypeSupported) { if (urlToLoad) { - if (videoRef?.current.paused) { - void videoRef.current.play(); + if (videoRef?.current?.paused) { + void videoRef?.current?.play(); } }