aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerIssueLocations.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/components/SourceViewer/SourceViewerIssueLocations.js')
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/SourceViewerIssueLocations.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerIssueLocations.js b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerIssueLocations.js
index 776fad074e1..e0270d5e6c6 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerIssueLocations.js
+++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerIssueLocations.js
@@ -217,8 +217,9 @@ export default class SourceViewerIssueLocations extends React.PureComponent {
if (selectedLocation == null) {
return false;
} else {
- return selectedLocation.flowIndex === flowIndex &&
- selectedLocation.locationIndex === locationIndex;
+ return (
+ selectedLocation.flowIndex === flowIndex && selectedLocation.locationIndex === locationIndex
+ );
}
}
@@ -240,7 +241,7 @@ export default class SourceViewerIssueLocations extends React.PureComponent {
const selected = this.isLocationSelected(flowIndex, locations.length - locationIndex - 1);
return (
- <li key={key} ref={node => this.locations[key] = node} className="spacer-bottom">
+ <li key={key} ref={node => (this.locations[key] = node)} className="spacer-bottom">
{line != null && <code className="source-issue-locations-line">L{line}</code>}
<a
className={classNames('issue-location-message', 'flash', 'flash-heavy', {
@@ -270,11 +271,11 @@ export default class SourceViewerIssueLocations extends React.PureComponent {
<AutoSizer disableHeight={true}>
{({ width }) => (
<div
- ref={node => this.rootNode = node}
+ ref={node => (this.rootNode = node)}
className="source-issue-locations"
style={{ width, height }}>
<div
- ref={node => this.fixedNode = node}
+ ref={node => (this.fixedNode = node)}
className={className}
style={{ width, height }}>
<header className="source-issue-locations-header" />
@@ -288,14 +289,15 @@ export default class SourceViewerIssueLocations extends React.PureComponent {
{translate('source_viewer.to_navigate_issue_locations')}
</div>
<ul
- ref={node => this.node = node}
+ ref={node => (this.node = node)}
className="source-issue-locations-list"
style={{ height: height - 15 }}>
{flows.map(
(flow, flowIndex) =>
flow.locations != null &&
this.reverseLocations(flow.locations).map((location, locationIndex) =>
- this.renderLocation(location, flowIndex, locationIndex, flow.locations || []))
+ this.renderLocation(location, flowIndex, locationIndex, flow.locations || [])
+ )
)}
</ul>
<DraggableCore axis="y" onDrag={this.handleDrag} offsetParent={document.body}>