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 27061563ea
commit 362967f0c9
1 changed files with 3 additions and 1 deletions

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; });