FIX: Presence was broken with a null array
This commit is contained in:
parent
846e573766
commit
a9ed0023dc
|
@ -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;
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -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(){
|
||||
|
|
Loading…
Reference in New Issue