DEV: under specific conditions (like tests) presenceState can be null (#16990)

This commit is contained in:
Joffrey JAFFEUX 2022-06-03 20:59:30 +02:00 committed by GitHub
parent f8d2da2fa0
commit 17227e9e53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}
}