gui: Handle folder missing in model on error event (#8120)

This commit is contained in:
Simon Frei 2022-01-16 18:07:33 +01:00 committed by GitHub
parent 21d04b895a
commit b2996eee87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -399,6 +399,10 @@ angular.module('syncthing.core')
});
$scope.$on(Events.FOLDER_ERRORS, function (event, arg) {
if (!$scope.model[arg.data.folder]) {
console.log("Dropping folder errors event for unknown folder", arg.data.folder)
return;
}
$scope.model[arg.data.folder].errors = arg.data.errors.length;
});