aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2018-08-24 15:48:54 +0200
committerSonarTech <sonartech@sonarsource.com>2018-08-27 20:21:57 +0200
commit6be83fba1622cb8c41f9c1f537815ad801a16843 (patch)
tree9be20f5d515150d5f00a66f219c3d54f780657cd /server/sonar-web/src/main/js
parent19ef6dc90739edcfb7aedb8277d91988ce47f6cf (diff)
downloadsonarqube-6be83fba1622cb8c41f9c1f537815ad801a16843.tar.gz
sonarqube-6be83fba1622cb8c41f9c1f537815ad801a16843.zip
SONAR-11153 loaded issues when opening a permalink for a distant line
Diffstat (limited to 'server/sonar-web/src/main/js')
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.tsx b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.tsx
index 6ea9df12ea0..d9008a88fbc 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.tsx
+++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.tsx
@@ -223,8 +223,10 @@ export default class SourceViewerBase extends React.PureComponent<Props, State>
fetchComponent() {
this.setState({ loading: true });
+
+ const to = (this.props.aroundLine || 0) + LINES;
const loadIssues = (component: SourceViewerFile, sources: SourceLine[]) => {
- this.props.loadIssues(this.props.component, 1, LINES, this.props.branchLike).then(
+ this.props.loadIssues(this.props.component, 1, to, this.props.branchLike).then(
issues => {
if (this.mounted) {
const finalSources = sources.slice(0, LINES);