diff options
author | Yukai Huang | 2016-10-12 18:19:08 +0800 |
---|---|---|
committer | Yukai Huang | 2016-10-12 18:19:08 +0800 |
commit | 2f11706dd256502d3ad5912fce777bc19b92b609 (patch) | |
tree | e974cc6912603889da66d34b28f995b12d6a94fb /public/js | |
parent | ae3d142d9c36095b17f3468a44d28ad6f15ccbdd (diff) | |
parent | c98d2639286344188f50045ab2e28a157df7ddf7 (diff) |
Merge branch 'master' into webpack-frontend
Diffstat (limited to '')
-rw-r--r-- | public/js/index.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/public/js/index.js b/public/js/index.js index f3bdf115..f8f997d8 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -2870,14 +2870,14 @@ function sortOnlineUserList(list) { else if (usera.idle && !userb.idle) return 1; else { - if (usera.name.toLowerCase() < userb.name.toLowerCase()) { + if (usera.name && usera.name.toLowerCase() < userb.name.toLowerCase()) { return -1; - } else if (usera.name.toLowerCase() > userb.name.toLowerCase()) { + } else if (usera.name && usera.name.toLowerCase() > userb.name.toLowerCase()) { return 1; } else { - if (usera.color.toLowerCase() < userb.color.toLowerCase()) + if (usera.color && usera.color.toLowerCase() < userb.color.toLowerCase()) return -1; - else if (usera.color.toLowerCase() > userb.color.toLowerCase()) + else if (usera.color && usera.color.toLowerCase() > userb.color.toLowerCase()) return 1; else return 0; |