gui: Check that connection exists on event (fixes #7347) (#7348)

This commit is contained in:
Simon Frei 2021-02-09 12:37:35 +01:00 committed by GitHub
parent d842197931
commit f1ec7fe55b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -213,6 +213,9 @@ angular.module('syncthing.core')
});
$scope.$on(Events.DEVICE_DISCONNECTED, function (event, arg) {
if (!$scope.connections[arg.data.id]) {
return;
}
$scope.connections[arg.data.id].connected = false;
refreshDeviceStats();
});

View File

@ -213,6 +213,9 @@ angular.module('syncthing.core')
});
$scope.$on(Events.DEVICE_DISCONNECTED, function (event, arg) {
if (!$scope.connections[arg.data.id]) {
return;
}
$scope.connections[arg.data.id].connected = false;
refreshDeviceStats();
});