gui: Fix undefined variables fallout from #7049 (#7056)

This commit is contained in:
André Colomb 2020-10-26 09:09:32 +01:00 committed by GitHub
parent 9189c79d74
commit 0d90ae26ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1105,7 +1105,7 @@ angular.module('syncthing.core')
}; };
$scope.setDevicePause = function (device, pause) { $scope.setDevicePause = function (device, pause) {
$scope.devices[id].paused = pause; $scope.devices[device].paused = pause;
$scope.config.devices = $scope.deviceList(); $scope.config.devices = $scope.deviceList();
$scope.saveConfig(); $scope.saveConfig();
}; };
@ -1466,6 +1466,7 @@ angular.module('syncthing.core')
return; return;
} }
var id = $scope.currentDevice.deviceID
delete $scope.devices[id]; delete $scope.devices[id];
$scope.config.devices = $scope.deviceList(); $scope.config.devices = $scope.deviceList();