From: Pascal Mugnier Date: Wed, 7 Mar 2018 11:05:05 +0000 (+0100) Subject: SONAR-10397 Fix inconsistent list of files in "Code" tab with +100 files X-Git-Tag: 7.5~1581 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bfbc7ac7338abda5703fa1fcab9b8a06bf020cc1;p=sonarqube.git SONAR-10397 Fix inconsistent list of files in "Code" tab with +100 files --- diff --git a/server/sonar-web/src/main/js/apps/code/bucket.ts b/server/sonar-web/src/main/js/apps/code/bucket.ts index 8fc8bce8e65..503b56e30e8 100644 --- a/server/sonar-web/src/main/js/apps/code/bucket.ts +++ b/server/sonar-web/src/main/js/apps/code/bucket.ts @@ -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 }; }