Browse Source

gui: Prevent error without completion and nicer wrapping (fixes #4636)

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4637
Simon Frei 7 years ago
parent
commit
d87287c0d0

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

@@ -2054,7 +2054,7 @@ angular.module('syncthing.core')
             resetRemoteNeed();
             $scope.remoteNeedDevice = device;
             $scope.deviceFolders(device).forEach(function(folder) {
-                if ($scope.completion[device.deviceID][folder].needItems === 0) {
+                if ($scope.completion[device.deviceID][folder] !== undefined && $scope.completion[device.deviceID][folder].needItems === 0) {
                     return;
                 }
                 $scope.remoteNeedFolders.push(folder);

+ 1 - 1
gui/default/syncthing/transfer/remoteNeededFilesModalView.html

@@ -12,7 +12,7 @@
         </button>
         <div id="remoteNeed-{{folder}}" class="panel-collapse collapse">
           <div class="panel-body">
-            <table class="table table-striped table-dynamic">
+            <table class="table table-striped">
               <thead>
                 <tr>
                   <th translate>Path</th>