From 42d9d0393d4328c725f4e04dbff1d7089bf10653 Mon Sep 17 00:00:00 2001 From: hristoterezov Date: Fri, 23 Sep 2016 16:44:32 -0500 Subject: [PATCH] fix(FilmStrip): Add check for thumbnails --- modules/UI/videolayout/FilmStrip.js | 38 ++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/modules/UI/videolayout/FilmStrip.js b/modules/UI/videolayout/FilmStrip.js index 4dc12dcc6..e0aa813c8 100644 --- a/modules/UI/videolayout/FilmStrip.js +++ b/modules/UI/videolayout/FilmStrip.js @@ -216,24 +216,24 @@ const FilmStrip = { return new Promise(resolve => { let thumbs = this.getThumbs(!forceUpdate); - - thumbs.localThumb.animate({ - height: local.thumbHeight, - width: local.thumbWidth - }, { - queue: false, - duration: animate ? 500 : 0, - complete: resolve - }); - - thumbs.remoteThumbs.animate({ - height: remote.thumbHeight, - width: remote.thumbWidth - }, { - queue: false, - duration: animate ? 500 : 0, - complete: resolve - }); + if(thumbs.localThumb) + thumbs.localThumb.animate({ + height: local.thumbHeight, + width: local.thumbWidth + }, { + queue: false, + duration: animate ? 500 : 0, + complete: resolve + }); + if(thumbs.remoteThumbs) + thumbs.remoteThumbs.animate({ + height: remote.thumbHeight, + width: remote.thumbWidth + }, { + queue: false, + duration: animate ? 500 : 0, + complete: resolve + }); this.filmStrip.animate({ // adds 2 px because of small video 1px border @@ -270,4 +270,4 @@ const FilmStrip = { }; -export default FilmStrip; \ No newline at end of file +export default FilmStrip;