1
0
Преглед на файлове

Fixed error when video is not available (#4383)

WRadoslaw преди 1 година
родител
ревизия
021be18ce8
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      packages/atlas/src/views/viewer/VideoView/VideoView.tsx

+ 3 - 1
packages/atlas/src/views/viewer/VideoView/VideoView.tsx

@@ -251,7 +251,9 @@ export const VideoView: FC = () => {
       return
     }
 
-    const artwork: MediaImage[] = thumbnailUrls ? [{ src: thumbnailUrls[0], type: 'image/webp', sizes: '640x360' }] : []
+    const artwork: MediaImage[] = thumbnailUrls?.[0]
+      ? [{ src: thumbnailUrls[0], type: 'image/webp', sizes: '640x360' }]
+      : []
 
     navigator.mediaSession.metadata = new MediaMetadata({
       title: video.title || '',