mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 20:54:00 -06:00
DEV: under specific conditions (like tests) presenceState can be null (#16990)
This commit is contained in:
parent
f8d2da2fa0
commit
17227e9e53
@ -108,7 +108,7 @@ class PresenceChannel extends EmberObject {
|
||||
if (!this.subscribed) {
|
||||
return;
|
||||
}
|
||||
return this._presenceState.users;
|
||||
return this._presenceState?.users;
|
||||
}
|
||||
|
||||
@computed("_presenceState.count", "subscribed")
|
||||
@ -116,7 +116,7 @@ class PresenceChannel extends EmberObject {
|
||||
if (!this.subscribed) {
|
||||
return;
|
||||
}
|
||||
return this._presenceState.count;
|
||||
return this._presenceState?.count;
|
||||
}
|
||||
|
||||
@computed("_presenceState.count", "subscribed")
|
||||
@ -124,7 +124,7 @@ class PresenceChannel extends EmberObject {
|
||||
if (!this.subscribed) {
|
||||
return;
|
||||
}
|
||||
return this._presenceState.countOnly;
|
||||
return this._presenceState?.countOnly;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user