gui: Bandaid for null http errors (fixes #8261) (#8305)

This commit is contained in:
Simon Frei 2022-04-25 19:15:14 +02:00 committed by GitHub
parent fff9bf98eb
commit 4031568cdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -178,7 +178,8 @@ angular.module('syncthing.core')
console.log('HTTPError', arg);
online = false;
if (!restarting) {
// We sometimes get arg == null from angularjs - no idea why
if (!restarting && arg) {
if (arg.status === 0) {
// A network error, not an HTTP error
$scope.$emit(Events.OFFLINE);