gui: Avoid validation error on closing folder editor (fixes #3808) (#6478)

This commit is contained in:
Simon Mwepu 2020-04-02 08:20:03 +02:00 committed by GitHub
parent 7da898f2d6
commit d50adb225b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1822,7 +1822,7 @@ angular.module('syncthing.core')
$scope.saveFolder = function () { $scope.saveFolder = function () {
$('#editFolder').modal('hide'); $('#editFolder').modal('hide');
var folderCfg = $scope.currentFolder; var folderCfg = angular.copy($scope.currentFolder);
folderCfg.devices = []; folderCfg.devices = [];
folderCfg.selectedDevices[$scope.myID] = true; folderCfg.selectedDevices[$scope.myID] = true;
for (var deviceID in folderCfg.selectedDevices) { for (var deviceID in folderCfg.selectedDevices) {