From 46abafdccca85abb28b19ae2058ac7f92aed4706 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 24 Sep 2020 16:40:51 +0200 Subject: [PATCH] ensure cloned is always set to false for this._data by making all assignments of this._data go through applyChanges --- src/matrix/room/RoomSummary.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/matrix/room/RoomSummary.js b/src/matrix/room/RoomSummary.js index c708ee91..292e7917 100644 --- a/src/matrix/room/RoomSummary.js +++ b/src/matrix/room/RoomSummary.js @@ -223,7 +223,8 @@ class SummaryData { export class RoomSummary { constructor(roomId) { - this._data = new SummaryData(null, roomId); + this._data = null; + this.applyChanges(new SummaryData(null, roomId)); } get data() { @@ -286,7 +287,7 @@ export class RoomSummary { } async load(summary) { - this._data = new SummaryData(summary); + this.applyChanges(new SummaryData(summary)); } }