aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps
diff options
context:
space:
mode:
authorStas Vilchik <stas-vilchik@users.noreply.github.com>2017-05-11 10:04:50 +0200
committerGitHub <noreply@github.com>2017-05-11 10:04:50 +0200
commit1633511736e086e20e303dae82136f4506646ed4 (patch)
treea5bfe0003ee75f0e6a73931125aba0de217d4a63 /server/sonar-web/src/main/js/apps
parent133d5af9c0d39429334a140b9ead77bda2b4fe98 (diff)
downloadsonarqube-1633511736e086e20e303dae82136f4506646ed4.tar.gz
sonarqube-1633511736e086e20e303dae82136f4506646ed4.zip
SONAR-9174 Display issue box on the last line of its primary location (#2047)
Diffstat (limited to 'server/sonar-web/src/main/js/apps')
-rw-r--r--server/sonar-web/src/main/js/apps/issues/components/App.js2
-rw-r--r--server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/components/App.js b/server/sonar-web/src/main/js/apps/issues/components/App.js
index 4a9dca21d04..e56811d72c3 100644
--- a/server/sonar-web/src/main/js/apps/issues/components/App.js
+++ b/server/sonar-web/src/main/js/apps/issues/components/App.js
@@ -453,7 +453,7 @@ export default class App extends React.PureComponent {
if (lastIssue.component !== openIssue.component) {
return true;
}
- return lastIssue.line != null && lastIssue.line > to;
+ return lastIssue.textRange != null && lastIssue.textRange.endLine > to;
};
if (done(issues, paging)) {
diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.js b/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.js
index 062d8530e6d..8580fcff5b6 100644
--- a/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.js
+++ b/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.js
@@ -78,7 +78,7 @@ export default class IssuesSourceViewer extends React.PureComponent {
return (
<div ref={node => (this.node = node)}>
<SourceViewer
- aroundLine={openIssue.line}
+ aroundLine={openIssue.textRange ? openIssue.textRange.endLine : undefined}
component={openIssue.component}
displayAllIssues={true}
highlightedLocations={locations}