Return array and not a promise from Repo.search
This commit is contained in:
parent
9c149313f7
commit
4afd7db020
|
@ -149,7 +149,14 @@ Repo.reopenClass
|
||||||
repos
|
repos
|
||||||
|
|
||||||
search: (store, query) ->
|
search: (store, query) ->
|
||||||
store.find('repo', search: query, orderBy: 'name')
|
promise = store.find('repo', search: query, orderBy: 'name')
|
||||||
|
result = Ember.ArrayProxy.create(content: [])
|
||||||
|
|
||||||
|
promise.then ->
|
||||||
|
result.pushObjects(promise.get('content').toArray())
|
||||||
|
result.set('isLoaded', true)
|
||||||
|
|
||||||
|
result
|
||||||
|
|
||||||
withLastBuild: (store) ->
|
withLastBuild: (store) ->
|
||||||
repos = store.filter('repo', {}, (build) ->
|
repos = store.filter('repo', {}, (build) ->
|
||||||
|
|
Loading…
Reference in New Issue
Block a user