UI: remove redundant commas in tags list (services view)

When some services had no tags(Tags is null) and some did have tags redundant commas were added to the tags list.
This commit is contained in:
Omer Kushnir 2016-09-15 11:37:45 +03:00 committed by GitHub
parent f57b84b807
commit 1bc030ecba

View File

@ -250,7 +250,9 @@ App.ServicesShowRoute = App.BaseRoute.extend({
setupController: function(controller, model) {
var tags = [];
model.map(function(obj){
tags = tags.concat(obj.Service.Tags);
if (obj.Service.Tags !== null) {
tags = tags.concat(obj.Service.Tags);
}
});
tags = tags.filter(function(n){ return n !== undefined; });