Merge pull request #4552 from matrix-org/foldleft/fix-sublist-crash
Fix a crash where a name could unexpectedly be an empty list
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user