From 503c2b59786601ea728187e5816400ae37c98908 Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 21 May 2012 09:40:40 +0300 Subject: [PATCH] use [].some, not Ox.getObject --- source/Ox.UI/js/Video/Ox.VideoPreview.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/Ox.UI/js/Video/Ox.VideoPreview.js b/source/Ox.UI/js/Video/Ox.VideoPreview.js index d0a86533..a404465c 100644 --- a/source/Ox.UI/js/Video/Ox.VideoPreview.js +++ b/source/Ox.UI/js/Video/Ox.VideoPreview.js @@ -123,10 +123,11 @@ Ox.VideoPreview = function(options, self) { Ox.loop(0, self.options.width, step, function(x) { var position = getPosition(x), frame = self.options.getFrame(position); - if ( - !Ox.getObject(self.loaded, 'frame', frame) - && !Ox.getObject(self.queue, 'frame', frame) - ) { + if (!self.loaded.some(function(image) { + return image.frame == frame; + }) && !self.queue.some(function(image) { + return image.frame == frame; + })) { self.queue.push({frame: frame, position: position}); } });