mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-10 04:06:34 +01:00
make sure aliases and heroes aren't empty when picking name
This commit is contained in:
parent
2848e85c87
commit
8a55778c32
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "brawl-chat",
|
"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",
|
"description": "A javascript matrix client prototype, trying to minize RAM usage by offloading as much as possible to IndexedDB",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
|
@ -26,10 +26,10 @@ export default class RoomSummary {
|
|||||||
if (this._canonicalAlias) {
|
if (this._canonicalAlias) {
|
||||||
return this._canonicalAlias;
|
return this._canonicalAlias;
|
||||||
}
|
}
|
||||||
if (this._aliases) {
|
if (Array.isArray(this._aliases) && this._aliases.length !== 0) {
|
||||||
return this._aliases[0];
|
return this._aliases[0];
|
||||||
}
|
}
|
||||||
if (this._heroes) {
|
if (Array.isArray(this._heroes) && this._heroes.length !== 0) {
|
||||||
return this._heroes.join(", ");
|
return this._heroes.join(", ");
|
||||||
}
|
}
|
||||||
return this._roomId;
|
return this._roomId;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user