Skip to content

Commit

Permalink
gui: Fix lastSeenDays error due to undefined deviceStats when adding …
Browse files Browse the repository at this point in the history
…new devices (ref syncthing#8730) (syncthing#9066)
  • Loading branch information
tomasz1986 committed Sep 1, 2023
1 parent 03590e5 commit 325b3b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gui/default/syncthing/core/syncthingController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 325b3b1

Please sign in to comment.