Browse Source

Merge pull request #1927 from ralder/patch-1

fix disappeared status of folder after restart syncthing
Jakob Borg 10 years ago
parent
commit
8fb4ce6cad
1 changed files with 5 additions and 0 deletions
  1. 5 0
      gui/scripts/syncthing/core/controllers/syncthingController.js

+ 5 - 0
gui/scripts/syncthing/core/controllers/syncthingController.js

@@ -521,6 +521,11 @@ angular.module('syncthing.core')
             if ($scope.model[folderCfg.id].state == 'error') {
                 return 'stopped'; // legacy, the state is called "stopped" in the GUI
             }
+            
+            // after restart syncthing process state may be empty
+            if (!$scope.model[folderCfg.id].state) {
+                return 'unknown'; 
+            }
 
             return '' + $scope.model[folderCfg.id].state;
         };