From 3db8ebf97f306961763be715f246c947a76a2fc3 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Mon, 27 Jul 2015 19:29:25 +0200 Subject: [PATCH] Ensure the appstore ui can operate always on manifest.tags --- webadmin/src/views/appstore.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webadmin/src/views/appstore.js b/webadmin/src/views/appstore.js index d9a00402a..ea99f9d6d 100644 --- a/webadmin/src/views/appstore.js +++ b/webadmin/src/views/appstore.js @@ -25,11 +25,17 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca AppStore.getApps(function (error, apps) { if (error) return callback(error); + // ensure we have a tags property for further use + apps.forEach(function (app) { + if (!app.manifest.tags) app.manifest.tags = []; + }); + Client.getNonApprovedApps(function (error, result) { if (error) return callback(error); // add testing tag to the manifest for UI and search reasons result.forEach(function (app) { + if (!app.manifest.tags) app.manifest.tags = []; app.manifest.tags.push('testing'); });