provide fallback for owner page is payload is empty
This commit is contained in:
parent
64a580f299
commit
def57c603b
|
@ -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')
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user