Selaa lähdekoodia

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

Simon Frei 3 vuotta sitten
vanhempi
sitoutus
4031568cdf
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      gui/default/syncthing/core/syncthingController.js

+ 2 - 1
gui/default/syncthing/core/syncthingController.js

@@ -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);