provide fallback for owner page is payload is empty

This commit is contained in:
Lisa P 2015-10-23 17:15:22 +02:00
parent 64a580f299
commit def57c603b

View File

@ -6,12 +6,13 @@ Controller = Ember.Controller.extend
repos: (->
data = @get('model')
repos = data.repositories.filter (item, index) ->
if item.active
console.log(item)
item
repos.sortBy('default_branch.last_build.finished_at').reverse()
repos = []
if data.repositories
repos = data.repositories.filter((item, index) ->
if item.active
item
).sortBy('default_branch.last_build.finished_at').reverse()
repos
).property('model')