]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-12977 Use snippet view for issues with a single secondary location
authorJeremy Davis <jeremy.davis@sonarsource.com>
Thu, 27 Feb 2020 12:34:56 +0000 (13:34 +0100)
committersonartech <sonartech@sonarsource.com>
Fri, 28 Feb 2020 20:04:11 +0000 (20:04 +0000)
server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx

index b513352a14bc10234fbdc1fb3c8a22069b57409e..1036a7d0f088df9012ec4312b0b0fd5ff5931925 100644 (file)
@@ -90,7 +90,7 @@ export default class IssuesSourceViewer extends React.PureComponent<Props> {
         ? selectedLocation && { index: selectedLocationIndex, text: selectedLocation.msg }
         : undefined;
 
-    if (locations.length > 1) {
+    if (locations.length > 0) {
       const components = uniq(locations.map(l => l.component));
       return (
         <div ref={node => (this.node = node)}>