Archived
1
0
This commit is contained in:
Jeff Becker 2017-11-02 08:45:17 -04:00
parent 9ef6d119c3
commit b25ce88232
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

View File

@ -69,11 +69,13 @@ function update_nntpchan_feed_ticker(elem, result_elem) {
} }
var result = j.result; var result = j.result;
result.sort(function(a, b) { result.sort(function(a, b) {
var aname = a.State.Config.Name; if(a && b) {
var bname = a.state.Config.Name; var aname = a.State.Config.Name;
if(aname > bname) return 1; var bname = b.state.Config.Name;
else if (aname < bname) return -1; if(aname > bname) return 1;
else return 0; else if (aname < bname) return -1;
else return 0;
} else return -1;
}); });
for (var idx = 0; idx < result.length; idx++) { for (var idx = 0; idx < result.length; idx++) {
var item = result[idx]; var item = result[idx];