mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-29 03:49:28 +08:00
Use resource as a fallback
This is useful mainly for the tests they would otherwise fail as there is no room name to display while the tests are run. Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
58ab5c36bb
commit
ffc0230ab4
@ -226,7 +226,7 @@ class Pill extends React.Component {
|
|||||||
case Pill.TYPE_ROOM_MENTION: {
|
case Pill.TYPE_ROOM_MENTION: {
|
||||||
const room = this.state.room;
|
const room = this.state.room;
|
||||||
if (room) {
|
if (room) {
|
||||||
linkText = room.name;
|
linkText = room.name || resource;
|
||||||
if (this.props.shouldShowPillAvatar) {
|
if (this.props.shouldShowPillAvatar) {
|
||||||
avatar = <RoomAvatar room={room} width={16} height={16} aria-hidden="true" />;
|
avatar = <RoomAvatar room={room} width={16} height={16} aria-hidden="true" />;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user