Ver código fonte

gui: Check if folder exists in folderLabel (fixes #4965) (#4966)

Simon Frei 7 anos atrás
pai
commit
9f305f674a
1 arquivos alterados com 3 adições e 0 exclusões
  1. 3 0
      gui/default/syncthing/core/syncthingController.js

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

@@ -1760,6 +1760,9 @@ angular.module('syncthing.core')
         };
         };
 
 
         $scope.folderLabel = function (folderID) {
         $scope.folderLabel = function (folderID) {
+            if (!$scope.folders[folderID]) {
+                return folderID;
+            }
             var label = $scope.folders[folderID].label;
             var label = $scope.folders[folderID].label;
             return label.length > 0 ? label : folderID;
             return label.length > 0 ? label : folderID;
         }
         }