diff --git a/plugins/discourse-presence/assets/javascripts/discourse/components/composer-presence-display.js.es6 b/plugins/discourse-presence/assets/javascripts/discourse/components/composer-presence-display.js.es6 index 4c2437e99b5..dd50d3609d5 100644 --- a/plugins/discourse-presence/assets/javascripts/discourse/components/composer-presence-display.js.es6 +++ b/plugins/discourse-presence/assets/javascripts/discourse/components/composer-presence-display.js.es6 @@ -5,7 +5,7 @@ export default Ember.Component.extend({ @computed('composer.presenceUsers', 'currentUser.id') users(presenceUsers, currentUser_id){ - return presenceUsers.filter(user => user.id !== currentUser_id); + return (presenceUsers || []).filter(user => user.id !== currentUser_id); }, @computed('composer.presenceState.action') @@ -17,5 +17,4 @@ export default Ember.Component.extend({ shouldDisplay(length){ return length > 0; } - }); diff --git a/plugins/discourse-presence/assets/javascripts/discourse/initializers/composer-controller-presence.js.es6 b/plugins/discourse-presence/assets/javascripts/discourse/initializers/composer-controller-presence.js.es6 index 68f7d6f9841..3a98851d70f 100644 --- a/plugins/discourse-presence/assets/javascripts/discourse/initializers/composer-controller-presence.js.es6 +++ b/plugins/discourse-presence/assets/javascripts/discourse/initializers/composer-controller-presence.js.es6 @@ -10,6 +10,7 @@ function initialize(api) { presenceState: { compose_state: 'closed' }, keepAliveTimer: null, messageBusChannel: null, + presenceUsers: null, @observes('model.composeState', 'model.action', 'model.post', 'model.topic') openStatusChanged(){