1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-14 19:22:15 +03:00

Handle null userID

The tests inject messages with no sender, so for now let's maintain
behaviour as it was before.
This commit is contained in:
David Baker
2018-02-16 14:58:19 +00:00
parent 104f8b093d
commit 736d0df38d

View File

@@ -80,6 +80,7 @@ RoomState.prototype.getMember = function(userId) {
* @return {RoomMember} The member or null if they do not exist.
*/
RoomState.prototype.getSentinelMember = function(userId) {
if (!userId) return null;
let sentinel = this._sentinels[userId];
if (sentinel === undefined) {