From da39dfada33fe152c1d2297ff69dbf0739564516 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Wed, 5 Dec 2018 12:03:47 +0100 Subject: [PATCH] gui: Don't use newfangled ES6 features (fixes #5348) --- gui/default/syncthing/core/syncthingController.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index 2af7544e2..a4145df28 100755 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -1371,16 +1371,14 @@ angular.module('syncthing.core') $('#editDevice').modal(); }; - $scope.selectAllFolders = function() { - Object.entries($scope.folders).forEach(entry =>{ - let id = entry[1].id; + $scope.selectAllFolders = function () { + angular.forEach($scope.folders, function (id) { $scope.currentDevice.selectedFolders[id] = true; }); }; - $scope.deSelectAllFolders = function() { - Object.entries($scope.folders).forEach(entry =>{ - let id = entry[1].id; + $scope.deSelectAllFolders = function () { + angular.forEach($scope.folders, function (id) { $scope.currentDevice.selectedFolders[id] = false; }); };