From 574e128f168d3a11a91f0490bdff5f2436530022 Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 21 May 2012 09:05:35 +0300 Subject: [PATCH] use [].filter instead of Ox.getObject --- static/js/pandora/utils.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/js/pandora/utils.js b/static/js/pandora/utils.js index eda09f8b..5bf9e463 100644 --- a/static/js/pandora/utils.js +++ b/static/js/pandora/utils.js @@ -815,7 +815,9 @@ pandora.getVideoOptions = function(data) { var canPlayClips = data.editable || pandora.site.capabilities.canPlayClips[pandora.user.level] >= data.rightslevel, canPlayVideo = data.editable || pandora.site.capabilities.canPlayVideo[pandora.user.level] >= data.rightslevel, options = {}, - subtitlesLayer = Ox.getObject(pandora.site.layers, 'isSubtitles', true); + subtitlesLayer = pandora.site.layers.filter(function(layer) { + return layer.isSubtitles; + })[0]; options.subtitles = subtitlesLayer ? data.layers[subtitlesLayer.id].map(function(subtitle) { return { id: subtitle.id,