瀏覽代碼

gui: Fix lastSeenDays error due to undefined deviceStats when adding new devices (ref #8730) (#9066)

tomasz1986 2 年之前
父節點
當前提交
325b3b114f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      gui/default/syncthing/core/syncthingController.js

+ 1 - 1
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';