Procházet zdrojové kódy

gui: Add missing $scope in editDeviceUntrustedChanged function (#9117)

Because $scope is missing, there are JavaScript errors when ticking and
unticking the "Untrusted" checkbox in the Advanced tab of the Edit
Device modal.

Signed-off-by: Tomasz Wilczyński <[email protected]>
tomasz1986 před 2 roky
rodič
revize
19bbf4f6bf

+ 3 - 3
gui/default/syncthing/core/syncthingController.js

@@ -1711,9 +1711,9 @@ angular.module('syncthing.core')
         }
 
         $scope.editDeviceUntrustedChanged = function () {
-            if (currentDevice.untrusted) {
-                currentDevice.introducer = false;
-                currentDevice.autoAcceptFolders = false;
+            if ($scope.currentDevice.untrusted) {
+                $scope.currentDevice.introducer = false;
+                $scope.currentDevice.autoAcceptFolders = false;
             }
         }