diff --git a/package.json b/package.json index 57e868bb..b0706552 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "brawl-chat", - "version": "0.0.10", + "version": "0.0.11", "description": "A javascript matrix client prototype, trying to minize RAM usage by offloading as much as possible to IndexedDB", "main": "index.js", "directories": { diff --git a/src/matrix/room/summary.js b/src/matrix/room/summary.js index c268e7e9..614b494d 100644 --- a/src/matrix/room/summary.js +++ b/src/matrix/room/summary.js @@ -26,10 +26,10 @@ export default class RoomSummary { if (this._canonicalAlias) { return this._canonicalAlias; } - if (this._aliases) { + if (Array.isArray(this._aliases) && this._aliases.length !== 0) { return this._aliases[0]; } - if (this._heroes) { + if (Array.isArray(this._heroes) && this._heroes.length !== 0) { return this._heroes.join(", "); } return this._roomId;