Ensure PSM author is reset when changing posts.

This commit is contained in:
Robert Jackson 2014-08-10 10:40:04 -04:00
parent 1da2047236
commit 9e07e18d2a

View File

@ -13,13 +13,17 @@ var PostSettingsMenuController = Ember.ObjectController.extend({
this.addObserver('titleScratch', this, 'titleObserver');
}
},
selectedAuthor: Ember.computed(function () {
selectedAuthor: null,
initializeSelectedAuthor: Ember.observer('model', function () {
var self = this;
return this.get('author').then(function (author) {
self.set('selectedAuthor', author);
return author;
});
}),
}).on('init'),
changeAuthor: function () {
var author = this.get('author'),
selectedAuthor = this.get('selectedAuthor'),