mirror of
https://github.com/discourse/discourse.git
synced 2025-01-30 03:21:02 +08:00
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')
|
@computed('composer.presenceUsers', 'currentUser.id')
|
||||||
users(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')
|
@computed('composer.presenceState.action')
|
||||||
|
@ -17,5 +17,4 @@ export default Ember.Component.extend({
|
||||||
shouldDisplay(length){
|
shouldDisplay(length){
|
||||||
return length > 0;
|
return length > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -10,6 +10,7 @@ function initialize(api) {
|
||||||
presenceState: { compose_state: 'closed' },
|
presenceState: { compose_state: 'closed' },
|
||||||
keepAliveTimer: null,
|
keepAliveTimer: null,
|
||||||
messageBusChannel: null,
|
messageBusChannel: null,
|
||||||
|
presenceUsers: null,
|
||||||
|
|
||||||
@observes('model.composeState', 'model.action', 'model.post', 'model.topic')
|
@observes('model.composeState', 'model.action', 'model.post', 'model.topic')
|
||||||
openStatusChanged(){
|
openStatusChanged(){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user