summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gui/app.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/gui/app.js b/gui/app.js
index 98dfbd5788..572d2b8241 100644
--- a/gui/app.js
+++ b/gui/app.js
@@ -54,11 +54,10 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
}
function nodeCompare(a, b) {
- if (a.NodeID === $scope.myID) {
- return -1;
- }
- if (b.NodeID === $scope.myID) {
- return 1;
+ if (typeof a.Name !== 'undefined' && typeof b.Name !== 'undefined') {
+ if (a.Name < b.Name)
+ return -1;
+ return a.Name > b.Name;
}
if (a.NodeID < b.NodeID) {
return -1;