Skip to content

Commit

Permalink
Fixing JS error (mattermost#6813)
Browse files Browse the repository at this point in the history
* Fixing JS error

* Fixing js error and storing issue
  • Loading branch information
coreyhulen committed Jul 1, 2017
1 parent 29491b3 commit 2ab50bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion utils/channel_utils.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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});
}

Expand Down
2 changes: 1 addition & 1 deletion utils/utils.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'.
Expand Down

0 comments on commit 2ab50bc

Please sign in to comment.