diff options
author | Stas Vilchik <stas-vilchik@users.noreply.github.com> | 2017-04-24 10:36:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-24 10:36:38 +0200 |
commit | c5471380870c76f5d714325c29cd0964a2fb324f (patch) | |
tree | 1fa6db9cb59be023076d49da97d25b8f50c7bfe5 /server/sonar-web/src/main/js/helpers | |
parent | 46337152f44def08a125acd8460007cfdd210de3 (diff) | |
download | sonarqube-c5471380870c76f5d714325c29cd0964a2fb324f.tar.gz sonarqube-c5471380870c76f5d714325c29cd0964a2fb324f.zip |
SONAR-9067 Display multiple flows in the issues list (#1969)
Diffstat (limited to 'server/sonar-web/src/main/js/helpers')
-rw-r--r-- | server/sonar-web/src/main/js/helpers/issues.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/helpers/issues.js b/server/sonar-web/src/main/js/helpers/issues.js index 804b410abf0..92603e52e17 100644 --- a/server/sonar-web/src/main/js/helpers/issues.js +++ b/server/sonar-web/src/main/js/helpers/issues.js @@ -108,6 +108,12 @@ const ensureTextRange = (issue: RawIssue) => { : {}; }; +const reverseLocations = (locations: Array<*>) => { + const x = [...locations]; + x.reverse(); + return x; +}; + const splitFlows = ( issue: RawIssue // $FlowFixMe textRange is not null @@ -121,7 +127,7 @@ const splitFlows = ( return onlySecondaryLocations ? { secondaryLocations: flatten(parsedFlows), flows: [] } - : { secondaryLocations: [], flows: parsedFlows }; + : { secondaryLocations: [], flows: parsedFlows.map(reverseLocations) }; }; export const parseIssueFromResponse = ( |