mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-02 08:13:34 +03:00
Merge pull request #3490 from jaswilli/psm
Fix for missing author when switching posts
This commit is contained in:
commit
f5f4a4e152
@ -32,10 +32,17 @@ var PostSettingsMenuController = Ember.ObjectController.extend({
|
||||
}.observes('selectedAuthor'),
|
||||
authors: function () {
|
||||
//Loaded asynchronously, so must use promise proxies.
|
||||
var deferred = {};
|
||||
var deferred = {},
|
||||
self = this;
|
||||
|
||||
deferred.promise = this.store.find('user').then(function (users) {
|
||||
return users.rejectBy('id', 'me');
|
||||
}).then(function (users) {
|
||||
self.set('selectedAuthor', users.get('firstObject'));
|
||||
|
||||
return users;
|
||||
});
|
||||
|
||||
return Ember.ArrayProxy
|
||||
.extend(Ember.PromiseProxyMixin)
|
||||
.create(deferred);
|
||||
|
Loading…
Reference in New Issue
Block a user