diff --git a/webapp/utils/channel_utils.jsx b/webapp/utils/channel_utils.jsx index 1afce39b45..e3a9f04234 100644 --- a/webapp/utils/channel_utils.jsx +++ b/webapp/utils/channel_utils.jsx @@ -107,7 +107,7 @@ export function sortChannelsByDisplayName(a, b) { const aDisplayName = getChannelDisplayName(a); const bDisplayName = getChannelDisplayName(b); - if (aDisplayName !== bDisplayName) { + if (aDisplayName !== null && bDisplayName !== null && aDisplayName !== bDisplayName) { return aDisplayName.localeCompare(bDisplayName, locale, {numeric: true}); } diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx index 56482a0fb2..68f43b543b 100644 --- a/webapp/utils/utils.jsx +++ b/webapp/utils/utils.jsx @@ -1011,7 +1011,7 @@ export function displayUsernameForUser(user) { return name; } - return null; + return ''; } // Converts a file size in bytes into a human-readable string of the form '123MB'.