mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Merge pull request #3490 from jaswilli/psm
Fix for missing author when switching posts
This commit is contained in:
commit
262169fcf8
1 changed files with 8 additions and 1 deletions
|
@ -32,10 +32,17 @@ var PostSettingsMenuController = Ember.ObjectController.extend({
|
||||||
}.observes('selectedAuthor'),
|
}.observes('selectedAuthor'),
|
||||||
authors: function () {
|
authors: function () {
|
||||||
//Loaded asynchronously, so must use promise proxies.
|
//Loaded asynchronously, so must use promise proxies.
|
||||||
var deferred = {};
|
var deferred = {},
|
||||||
|
self = this;
|
||||||
|
|
||||||
deferred.promise = this.store.find('user').then(function (users) {
|
deferred.promise = this.store.find('user').then(function (users) {
|
||||||
return users.rejectBy('id', 'me');
|
return users.rejectBy('id', 'me');
|
||||||
|
}).then(function (users) {
|
||||||
|
self.set('selectedAuthor', users.get('firstObject'));
|
||||||
|
|
||||||
|
return users;
|
||||||
});
|
});
|
||||||
|
|
||||||
return Ember.ArrayProxy
|
return Ember.ArrayProxy
|
||||||
.extend(Ember.PromiseProxyMixin)
|
.extend(Ember.PromiseProxyMixin)
|
||||||
.create(deferred);
|
.create(deferred);
|
||||||
|
|
Loading…
Add table
Reference in a new issue