Skip to content

Commit

Permalink
gui: Check if versioning object exists (fixes syncthing#7449) (syncth…
Browse files Browse the repository at this point in the history
  • Loading branch information
imsodin committed Mar 11, 2021
1 parent 9a00105 commit cf838c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gui/default/syncthing/core/syncthingController.js
Original file line number Diff line number Diff line change
Expand Up @@ -2053,6 +2053,9 @@ angular.module('syncthing.core')
folderCfg.devices = newDevices;
delete $scope.currentSharing;

if (!folderCfg.versioning) {
folderCfg.versioning = {params: {}};
}
folderCfg.versioning.type = folderCfg._guiVersioning.selector;
if ($scope.internalVersioningEnabled()) {
folderCfg.versioning.cleanupIntervalS = folderCfg._guiVersioning.cleanupIntervalS;
Expand Down
3 changes: 3 additions & 0 deletions gui/default/untrusted/syncthing/core/syncthingController.js
Original file line number Diff line number Diff line change
Expand Up @@ -2093,6 +2093,9 @@ angular.module('syncthing.core')
folderCfg.devices = newDevices;
delete $scope.currentSharing;

if (!folderCfg.versioning) {
folderCfg.versioning = {params: {}};
}
folderCfg.versioning.type = folderCfg._guiVersioning.selector;
if ($scope.internalVersioningEnabled()) {
folderCfg.versioning.cleanupIntervalS = folderCfg._guiVersioning.cleanupIntervalS;
Expand Down

0 comments on commit cf838c7

Please sign in to comment.