]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-10397 Fix inconsistent list of files in "Code" tab with +100 files
authorPascal Mugnier <pascal.mugnier@sonarsource.com>
Wed, 7 Mar 2018 11:05:05 +0000 (12:05 +0100)
committerPascal Mugnier <pascal.mugnier@sonarsource.com>
Wed, 7 Mar 2018 11:05:05 +0000 (12:05 +0100)
server/sonar-web/src/main/js/apps/code/bucket.ts

index 8fc8bce8e65e9aa17c18cadf407fd6bf43fcf06e..503b56e30e8b7570273abe9d5b51190f51a2fd78 100644 (file)
@@ -17,6 +17,7 @@
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
+import { concat } from 'lodash';
 import { Breadcrumb, Component } from './types';
 
 let bucket: { [key: string]: Component } = {};
@@ -43,6 +44,10 @@ export function addComponentChildren(
   total: number,
   page: number
 ): void {
+  const previous = getComponentChildren(componentKey);
+  if (previous) {
+    children = concat(children, previous.children);
+  }
   childrenBucket[componentKey] = { children, total, page };
 }