From 9671036fe0599fc4ffac4f467ddfb1544accc067 Mon Sep 17 00:00:00 2001 From: Stephen Cameron Date: Tue, 6 Jun 2017 10:41:10 +0200 Subject: [PATCH] Fix JS error when no videos present #897 @0:20 --- js/libs/fluidbook/fluidbook.video.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5