From: Stas Vilchik Date: Tue, 12 Jan 2016 14:44:33 +0000 (+0100) Subject: fix breadcrumbs order on the code page X-Git-Tag: 5.4-M5~30 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f6f2d93b63c712e267c4fb0b7aebce7dec4767db;p=sonarqube.git fix breadcrumbs order on the code page --- diff --git a/server/sonar-web/src/main/js/api/components.js b/server/sonar-web/src/main/js/api/components.js index 8a6d69de6cc..3594af8a1a8 100644 --- a/server/sonar-web/src/main/js/api/components.js +++ b/server/sonar-web/src/main/js/api/components.js @@ -84,5 +84,8 @@ export function getParents ({ id, key }) { export function getBreadcrumbs ({ id, key }) { const url = baseUrl + '/api/components/show'; const data = id ? { id } : { key }; - return getJSON(url, data).then(r => [...r.ancestors, r.component]); + return getJSON(url, data).then(r => { + const reversedAncestors = [...r.ancestors].reverse(); + return [...reversedAncestors, r.component]; + }); }