From f6f2d93b63c712e267c4fb0b7aebce7dec4767db Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Tue, 12 Jan 2016 15:44:33 +0100 Subject: [PATCH] fix breadcrumbs order on the code page --- server/sonar-web/src/main/js/api/components.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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]; + }); } -- 2.39.5