Fixing JS error (#6813)

* Fixing JS error

* Fixing js error and storing issue
This commit is contained in:
Corey Hulen
2017-06-30 17:19:04 -07:00
committed by GitHub
parent 6e5b1b7cd4
commit d2eb10b7e6
2 changed files with 2 additions and 2 deletions

View File

@@ -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});
}

View File

@@ -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'.