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
2 changed files with 6 additions and 0 deletions
@@ -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();
});
@@ -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();
});