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

This commit is contained in:
Simon Frei 2018-05-23 12:41:04 +02:00 committed by Jakob Borg
parent 9d2b744c12
commit 9f305f674a
1 changed files with 3 additions and 0 deletions

View File

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