Fix a crash where a name could unexpectedly be an empty list
This commit is contained in:
parent
aa0c6f1f71
commit
781cbea744
2 changed files with 39 additions and 4 deletions
|
@ -432,10 +432,9 @@ export default createReactClass({
|
|||
});
|
||||
|
||||
let name = this.state.roomName;
|
||||
if (name == undefined || name == null) name = '';
|
||||
if (typeof name !== 'string') name = '';
|
||||
name = name.replace(":", ":\u200b"); // add a zero-width space to allow linewrapping after the colon
|
||||
|
||||
|
||||
let badge;
|
||||
if (badges) {
|
||||
const limitedCount = FormattingUtils.formatCount(notificationCount);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue