From 9e07e18d2a0b3cd4ea8c47fe02825098d2197fcd Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 10 Aug 2014 10:40:04 -0400 Subject: [PATCH] Ensure PSM author is reset when changing posts. --- ghost/admin/controllers/post-settings-menu.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ghost/admin/controllers/post-settings-menu.js b/ghost/admin/controllers/post-settings-menu.js index 4bd9f6a9fa..2c47490bf6 100644 --- a/ghost/admin/controllers/post-settings-menu.js +++ b/ghost/admin/controllers/post-settings-menu.js @@ -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'),