test for existence of before looping over it

This commit is contained in:
rolux 2012-07-02 15:45:18 +02:00
parent 6e0b496852
commit f6a767b6cb

View file

@ -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