fix: length error on undefined fallback videos (#147)

This commit is contained in:
Kristin Aoki
2022-11-29 12:44:56 -05:00
committed by GitHub
parent 08b5475548
commit f38ae87c95

View File

@@ -92,7 +92,7 @@ export const determineVideoSource = ({
[videoSource, fallbackVideos] = [html5Sources[0], html5Sources.slice(1)];
videoType = 'html5source';
}
if (fallbackVideos.length === 0) {
if (!fallbackVideos || fallbackVideos.length === 0) {
fallbackVideos = ['', ''];
}
return {