From 325b3b114fbbc4bc04c6a6672025f598286c3d65 Mon Sep 17 00:00:00 2001 From: tomasz1986 Date: Fri, 1 Sep 2023 07:22:04 +0200 Subject: [PATCH] gui: Fix lastSeenDays error due to undefined deviceStats when adding new devices (ref #8730) (#9066) --- gui/default/syncthing/core/syncthingController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index 975cb4638..26e067a59 100755 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -1090,7 +1090,7 @@ angular.module('syncthing.core') } // Disconnected - if (!unused && $scope.deviceStats[deviceCfg.deviceID].lastSeenDays && $scope.deviceStats[deviceCfg.deviceID].lastSeenDays >= 7) { + if (!unused && $scope.deviceStats[deviceCfg.deviceID] && $scope.deviceStats[deviceCfg.deviceID].lastSeenDays && $scope.deviceStats[deviceCfg.deviceID].lastSeenDays >= 7) { return status + 'disconnected-inactive'; } else { return status + 'disconnected';