You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-01 04:43:29 +03:00
Merge pull request #675 from matrix-org/bwindels/nocrashoninvalidtags
make sure room.tags is always a valid object to avoid crashes
This commit is contained in:
@@ -1143,7 +1143,7 @@ Room.prototype.addTags = function(event) {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// XXX: do we need to deep copy here?
|
// XXX: do we need to deep copy here?
|
||||||
this.tags = event.getContent().tags;
|
this.tags = event.getContent().tags || {};
|
||||||
|
|
||||||
// XXX: we could do a deep-comparison to see if the tags have really
|
// XXX: we could do a deep-comparison to see if the tags have really
|
||||||
// changed - but do we want to bother?
|
// changed - but do we want to bother?
|
||||||
|
|||||||
Reference in New Issue
Block a user