Skip to content

Commit

Permalink
Fix API nodes sorting #346
Browse files Browse the repository at this point in the history
  • Loading branch information
svk31 committed Aug 31, 2017
1 parent 912a7de commit 16aba60
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions web/app/components/Settings/AccessSettings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,13 @@ class AccessSettings extends React.Component {
if(a.url == autoSelectAPI){
return -1;
} else if(a.up && b.up){
if(a.ping < b.ping) return -1;
if(a.ping === b.ping) return 0;
if(a.ping > b.ping) return 1;
return a.ping - b.ping;
} else if(!a.up && !b.up){
return 0;
return 1;
} else if(a.up && !b.up){
return -1;
} else if(b.up && !a.up){
return -1;
return 1;
}

return 0;
Expand Down

0 comments on commit 16aba60

Please sign in to comment.