From f6a767b6cb4d77dd36b89d0a2536b381b3207356 Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 2 Jul 2012 15:45:18 +0200 Subject: [PATCH] test for existence of before looping over it --- source/Ox.UI/js/Video/VideoPlayer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Ox.UI/js/Video/VideoPlayer.js b/source/Ox.UI/js/Video/VideoPlayer.js index 810345ba..e657f5dc 100644 --- a/source/Ox.UI/js/Video/VideoPlayer.js +++ b/source/Ox.UI/js/Video/VideoPlayer.js @@ -1669,7 +1669,7 @@ Ox.VideoPlayer = function(options, self) { self.$posterMarker && Ox.forEach(self.$posterMarker, function(marker) { marker.hide(); }); - Ox.forEach(self.$pointMarker, function(markers) { + self.$pointMarker && Ox.forEach(self.$pointMarker, function(markers) { Ox.forEach(markers, function(marker) { marker.hide(); }); @@ -1957,7 +1957,7 @@ Ox.VideoPlayer = function(options, self) { isEqual(self.options.position, self.options.posterFrame) ? marker.show() : marker.hide(); }); - Ox.forEach(self.$pointMarker, function(markers, point) { + self.$pointMarker && Ox.forEach(self.$pointMarker, function(markers, point) { Ox.forEach(markers, function(marker) { //Ox.Log('Video', self.options.position, self.options[point], isEqual(self.options.position, self.options[point])) // fixme: there's a bug in jquery and/or webkit