stripRoomName: don't return "" if name is just "#"

This commit is contained in:
miruka 2019-07-04 17:11:00 -04:00
parent 22dfd83d32
commit 6b83d79f16

View File

@ -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
} }