fix disappeared status of folder after restart syncthing

sometimes after restart process syncthing '/rest/db/status' for folder may return data with 'state' = empty string
This commit is contained in:
ralder 2015-06-10 16:48:16 +03:00
parent 5c49b93c67
commit 7d1250620e

View File

@ -522,6 +522,11 @@ angular.module('syncthing.core')
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;
};