stripRoomName: don't return "" if name is just "#"
This commit is contained in:
parent
22dfd83d32
commit
6b83d79f16
|
@ -6,7 +6,7 @@ function stripUserId(user_id) {
|
||||||
|
|
||||||
function stripRoomName(name) {
|
function stripRoomName(name) {
|
||||||
// Remove leading # (aliases)
|
// Remove leading # (aliases)
|
||||||
return name[0] == "#" ? name.substring(1) : name
|
return name[0] == "#" && name.length > 1 ? name.substring(1) : name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user