summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Frei <freisim93@gmail.com>2021-03-11 11:21:35 +0100
committerGitHub <noreply@github.com>2021-03-11 11:21:35 +0100
commitcf838c71f731c61447416f2a759047906b113e4e (patch)
tree421a3c951d33fdcd591e519015a22473abd71b10
parent9a001051d6924ff363b26dff0580a046fd37c2c0 (diff)
downloadsyncthing-cf838c71f731c61447416f2a759047906b113e4e.tar.gz
syncthing-cf838c71f731c61447416f2a759047906b113e4e.zip
gui: Check if versioning object exists (fixes #7449) (#7450)v1.15.0-rc.3
-rwxr-xr-xgui/default/syncthing/core/syncthingController.js3
-rwxr-xr-xgui/default/untrusted/syncthing/core/syncthingController.js3
2 files changed, 6 insertions, 0 deletions
diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js
index 3fce15d63..35042ec1b 100755
--- a/gui/default/syncthing/core/syncthingController.js
+++ b/gui/default/syncthing/core/syncthingController.js
@@ -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;
diff --git a/gui/default/untrusted/syncthing/core/syncthingController.js b/gui/default/untrusted/syncthing/core/syncthingController.js
index a29aa4f81..fcc8b08bc 100755
--- a/gui/default/untrusted/syncthing/core/syncthingController.js
+++ b/gui/default/untrusted/syncthing/core/syncthingController.js
@@ -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;