forked from mystiq/hydrogen-web
make sure aliases and heroes aren't empty when picking name
This commit is contained in:
parent
2848e85c87
commit
8a55778c32
2 changed files with 3 additions and 3 deletions
|
@ -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": {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue