From: Stephen Cameron Date: Tue, 6 Jun 2017 08:41:10 +0000 (+0200) Subject: Fix JS error when no videos present #897 @0:20 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=9671036fe0599fc4ffac4f467ddfb1544accc067;p=fluidbook-html5.git Fix JS error when no videos present #897 @0:20 --- diff --git a/js/libs/fluidbook/fluidbook.video.js b/js/libs/fluidbook/fluidbook.video.js index 5657ecde..1a81ae6f 100644 --- a/js/libs/fluidbook/fluidbook.video.js +++ b/js/libs/fluidbook/fluidbook.video.js @@ -353,7 +353,7 @@ FluidbookVideo.prototype = { getActivePlayers: function() { var players = []; - if (Object.keys(videojs.players).length > 0) { + if (typeof(videojs) !== "undefined" && Object.keys(videojs.players).length > 0) { for(var id in videojs.players) { // When videoJS disposes a player, the ID isn't removed // from the list of players but the value will be null