]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-12451 Prevent refreshing snippets when entering flow
authorJeremy Davis <jeremy.davis@sonarsource.com>
Thu, 19 Sep 2019 14:59:23 +0000 (16:59 +0200)
committerSonarTech <sonartech@sonarsource.com>
Mon, 23 Sep 2019 18:21:07 +0000 (20:21 +0200)
server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/CrossComponentSourceViewerWrapper.tsx

index 41bcaf7335a2054cd6d35ddfee8675c2b062da7c..b324a014aa3420885251b8ea18412435f536fbdd 100644 (file)
@@ -223,7 +223,7 @@ export default class CrossComponentSourceViewerWrapper extends React.PureCompone
           }
           return (
             <SourceViewerContext.Provider
-              key={`${this.props.issue.key}-${this.props.selectedFlowIndex}-${i}`}
+              key={`${this.props.issue.key}-${this.props.selectedFlowIndex || 0}-${i}`}
               value={{ branchLike: this.props.branchLike, file: snippetGroup.component }}>
               <ComponentSourceSnippetViewer
                 branchLike={this.props.branchLike}