1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2026-01-03 23:22:30 +03:00

Also need to check if the event is null

This commit is contained in:
David Baker
2015-11-02 15:19:29 +00:00
parent c4a35020f1
commit 4adc5f2c85

View File

@@ -329,7 +329,11 @@ Room.prototype.getUsersReadUpTo = function(event) {
* an empty list.
*/
Room.prototype.getEventReadUpTo = function(userId) {
if (this._receipts === undefined || this._receipts['m.read'] === undefined) {
if (
this._receipts === undefined ||
this._receipts['m.read'] === undefined ||
this._receipts['m.read'][userId] === undefined
) {
return null;
}