From 3d5eebd57f8c658b1382420d03ecbe225f45ec20 Mon Sep 17 00:00:00 2001 From: Olivier Paroz Date: Mon, 14 Sep 2015 13:57:34 +0200 Subject: Rebuild buildFeaturesList after refactoring of galleryconfig --- js/galleryfileaction.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'js/galleryfileaction.js') diff --git a/js/galleryfileaction.js b/js/galleryfileaction.js index 88a4a7cd..e0a74645 100644 --- a/js/galleryfileaction.js +++ b/js/galleryfileaction.js @@ -53,16 +53,18 @@ /** * Prepares the features array * + * This is duplicated from a method found in galleryconfig. It's done that way in order to + * avoid having to load the whole utility class in the Files app + * * @param configFeatures * @returns {Array} */ buildFeaturesList: function (configFeatures) { var features = []; - var feature = null; - if (!$.isEmptyObject(configFeatures)) { - for (var i = 0, keys = Object.keys(configFeatures); i < keys.length; i++) { - feature = keys[i]; - features.push(feature); + var i, configFeaturesLength = configFeatures.length; + if (configFeaturesLength) { + for (i = 0; i < configFeaturesLength; i++) { + features.push(configFeatures[i]); } } -- cgit v1.2.3