From bc012d750dce9137b00334115c5494a5afa37bf4 Mon Sep 17 00:00:00 2001 From: Simon Frei Date: Tue, 27 Oct 2020 16:40:16 +0100 Subject: [PATCH] gui: Readd check if device exists (ref #7059) (#7061) This reverts commit c7d40ccbaee867b579ccb291b258fd28299b3464. --- gui/default/syncthing/core/syncthingController.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index 762cef7dc..1947de175 100755 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -1927,8 +1927,10 @@ angular.module('syncthing.core') // Bump time pendingFolder.time = (new Date()).toISOString(); - $scope.devices[id].ignoredFolders.push(pendingFolder); - $scope.saveConfig(); + if (id in $scope.devices) { + $scope.devices[id].ignoredFolders.push(pendingFolder); + $scope.saveConfig(); + } }; $scope.sharesFolder = function (folderCfg) {