You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-16 09:42:23 +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:
@@ -80,6 +80,7 @@ RoomState.prototype.getMember = function(userId) {
|
|||||||
* @return {RoomMember} The member or null if they do not exist.
|
* @return {RoomMember} The member or null if they do not exist.
|
||||||
*/
|
*/
|
||||||
RoomState.prototype.getSentinelMember = function(userId) {
|
RoomState.prototype.getSentinelMember = function(userId) {
|
||||||
|
if (!userId) return null;
|
||||||
let sentinel = this._sentinels[userId];
|
let sentinel = this._sentinels[userId];
|
||||||
|
|
||||||
if (sentinel === undefined) {
|
if (sentinel === undefined) {
|
||||||
|
|||||||
Reference in New Issue
Block a user