From: Jeremy Davis Date: Thu, 27 Feb 2020 12:34:56 +0000 (+0100) Subject: SONAR-12977 Use snippet view for issues with a single secondary location X-Git-Tag: 8.3.0.34182~177 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=80b9bc017cda9ead3ca0e3ad5c4aeb3a2b1407c0;p=sonarqube.git SONAR-12977 Use snippet view for issues with a single secondary location --- diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx index b513352a14b..1036a7d0f08 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx @@ -90,7 +90,7 @@ export default class IssuesSourceViewer extends React.PureComponent { ? selectedLocation && { index: selectedLocationIndex, text: selectedLocation.msg } : undefined; - if (locations.length > 1) { + if (locations.length > 0) { const components = uniq(locations.map(l => l.component)); return (
(this.node = node)}>