1
0
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:
Michael Telatynski
2018-08-01 23:03:51 +01:00
committed by GitHub

View File

@@ -1143,7 +1143,7 @@ Room.prototype.addTags = function(event) {
// }
// 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
// changed - but do we want to bother?