summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2017-06-30 17:19:04 -0700
committerGitHub <noreply@github.com>2017-06-30 17:19:04 -0700
commitd2eb10b7e66213d43e00551170e77acc220c0ef8 (patch)
tree7a3ab1e99b825b63a6649e186d14693f7911b014 /webapp
parent6e5b1b7cd48cd199b858ab8810cde74259843526 (diff)
downloadchat-d2eb10b7e66213d43e00551170e77acc220c0ef8.tar.gz
chat-d2eb10b7e66213d43e00551170e77acc220c0ef8.tar.bz2
chat-d2eb10b7e66213d43e00551170e77acc220c0ef8.zip
Fixing JS error (#6813)
* Fixing JS error * Fixing js error and storing issue
Diffstat (limited to 'webapp')
-rw-r--r--webapp/utils/channel_utils.jsx2
-rw-r--r--webapp/utils/utils.jsx2
2 files changed, 2 insertions, 2 deletions
diff --git a/webapp/utils/channel_utils.jsx b/webapp/utils/channel_utils.jsx
index 1afce39b4..e3a9f0423 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 56482a0fb..68f43b543 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'.