Check if announcement data is available

This commit is contained in:
Audrius Butkevicius 2014-12-01 19:53:13 +00:00
parent a8ba7786ae
commit bc8907e90d
2 changed files with 2 additions and 2 deletions

View File

@ -268,7 +268,7 @@ angular.module('syncthing.core')
$http.get(urlbase + '/system').success(function (data) {
$scope.myID = data.myID;
$scope.system = data;
$scope.announceServersTotal = Object.keys(data.extAnnounceOK).length;
$scope.announceServersTotal = data.extAnnounceOK ? Object.keys(data.extAnnounceOK).length : 0;
var failed = [];
for (var server in data.extAnnounceOK) {
if (!data.extAnnounceOK[server]) {

File diff suppressed because one or more lines are too long