From 4752fb77c9a23bccacd74ad08e219c03abb317ec 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. --- core/client/controllers/post-settings-menu.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/client/controllers/post-settings-menu.js b/core/client/controllers/post-settings-menu.js index 4bd9f6a9fa..2c47490bf6 100644 --- a/core/client/controllers/post-settings-menu.js +++ b/core/client/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'),