fix
This commit is contained in:
parent
835c912053
commit
de253fb204
@ -50,16 +50,16 @@ function inject_nntp_feed_element(feed, elem) {
|
|||||||
var conns = document.createElement("div");
|
var conns = document.createElement("div");
|
||||||
conns.setAttribute("class", "connections");
|
conns.setAttribute("class", "connections");
|
||||||
if (feed.Conns) {
|
if (feed.Conns) {
|
||||||
var conns = feed.Conns;
|
var c = feed.Conns;
|
||||||
conns.sort(function(a, b) {
|
c.sort(function(a, b) {
|
||||||
if(a && b) {
|
if(a && b) {
|
||||||
if (a.name > b.name) return 1;
|
if (a.name > b.name) return 1;
|
||||||
else if (a.name < b.name) return -1;
|
else if (a.name < b.name) return -1;
|
||||||
else return 0;
|
else return 0;
|
||||||
} else return -1;
|
} else return -1;
|
||||||
});
|
});
|
||||||
for ( var idx = 0 ; idx < conns.length; idx ++ ) {
|
for ( var idx = 0 ; idx < c.length; idx ++ ) {
|
||||||
conns.appendChild(createConnectionElement(conns[idx]));
|
conns.appendChild(createConnectionElement(c[idx]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elem.appendChild(conns);
|
elem.appendChild(conns);
|
||||||
|
Reference in New Issue
Block a user