From d0024f738bfc29e00821bbf363a249a5ad7e4a5c Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Wed, 23 Jul 2014 00:08:18 +0530 Subject: [PATCH] further optimize computed property --- app/assets/javascripts/discourse/controllers/invite.js.es6 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/invite.js.es6 b/app/assets/javascripts/discourse/controllers/invite.js.es6 index 63314163255..f7dd557a188 100644 --- a/app/assets/javascripts/discourse/controllers/invite.js.es6 +++ b/app/assets/javascripts/discourse/controllers/invite.js.es6 @@ -52,9 +52,7 @@ export default Discourse.ObjectController.extend(Discourse.ModalFunctionality, { @property isPrivateTopic **/ - isPrivateTopic: function() { - return this.get('invitingToTopic') && this.get('model.category.read_restricted'); - }.property('model'), + isPrivateTopic: Em.computed.and('invitingToTopic', 'model.category.read_restricted'), /** Instructional text for the modal.