diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-01-12 15:44:33 +0100 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2016-01-12 15:56:06 +0100 |
commit | f6f2d93b63c712e267c4fb0b7aebce7dec4767db (patch) | |
tree | 998acc6f93e7e3ae40fd3345aa31362e86490a25 /server/sonar-web | |
parent | bc2bbe653a82b01651a760353b2205e0594a011c (diff) | |
download | sonarqube-f6f2d93b63c712e267c4fb0b7aebce7dec4767db.tar.gz sonarqube-f6f2d93b63c712e267c4fb0b7aebce7dec4767db.zip |
fix breadcrumbs order on the code page
Diffstat (limited to 'server/sonar-web')
-rw-r--r-- | server/sonar-web/src/main/js/api/components.js | 5 |
1 files changed, 4 insertions, 1 deletions
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]; + }); } |