From bdda8c56c794ca8f9081518b561e8c9ddb32ca52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Fri, 9 Oct 2020 13:59:39 +0200 Subject: [PATCH] fix(VideoLayout) make thumbnail iteration more resilient If a failure occurs while we are still setting up the UI it's possible the local thumbnail is still null, and none of the code assumes it may be null, so skip it. --- modules/UI/videolayout/VideoLayout.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/UI/videolayout/VideoLayout.js b/modules/UI/videolayout/VideoLayout.js index a0072ac473..683685b15d 100644 --- a/modules/UI/videolayout/VideoLayout.js +++ b/modules/UI/videolayout/VideoLayout.js @@ -52,7 +52,7 @@ function onLocalFlipXChanged(val) { */ function getAllThumbnails() { return [ - localVideoThumbnail, + ...localVideoThumbnail ? [ localVideoThumbnail ] : [], ...Object.values(remoteVideos) ]; }