diff options
-rw-r--r-- | js/galleryfileaction.js | 12 |
1 files changed, 7 insertions, 5 deletions
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]); } } |