Skip to content

Commit

Permalink
Fix multiple default servers / resolves #73
Browse files Browse the repository at this point in the history
  • Loading branch information
tympanix committed Aug 31, 2017
1 parent 0678b90 commit 7db92d4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/controllers/settings.js
Expand Up @@ -160,7 +160,11 @@ angular.module("torrentApp").controller("settingsController", ["$rootScope", "$s

$scope.toggleDefaultServer = function(server) {
if (server.default === true) {
config.setDefault(server, true /* Skip saving */)
$scope.settings.servers.forEach(function(_server) {
if (server !== _server) {
_server.default = false;
}
})
}
}

Expand Down

0 comments on commit 7db92d4

Please sign in to comment.