]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9603 Fix broken browser history after clicking on the project activity preview...
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Mon, 7 Aug 2017 08:20:09 +0000 (10:20 +0200)
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>
Wed, 9 Aug 2017 14:29:43 +0000 (16:29 +0200)
server/sonar-web/src/main/js/apps/overview/events/AnalysesList.js
server/sonar-web/src/main/js/apps/overview/events/PreviewGraph.js

index a52e8fc6a74e573d5128059558b3d23682e73f4f..5e6004a3aae129f66eb6187d86fa5a3c52610958 100644 (file)
@@ -32,7 +32,7 @@ type Props = {
   history: ?History,
   project: string,
   qualifier: string,
-  router: { replace: ({ pathname: string, query?: {} }) => void }
+  router: { push: ({ pathname: string, query?: {} }) => void }
 };
 
 type State = {
index 5ecdab564372bc8ff2cc10a98b58a44e3cdc7135..56b92e0397d1ca8cb7407d3ec2bfc8aa994263c8 100644 (file)
@@ -41,7 +41,7 @@ type Props = {
   history: ?History,
   metrics: Array<Metric>,
   project: string,
-  router: { replace: ({ pathname: string, query?: {} }) => void }
+  router: { push: ({ pathname: string, query?: {} }) => void }
 };
 
 type State = {
@@ -133,7 +133,7 @@ export default class PreviewGraph extends React.PureComponent {
   };
 
   handleClick = () => {
-    this.props.router.replace({ pathname: '/project/activity', query: { id: this.props.project } });
+    this.props.router.push({ pathname: '/project/activity', query: { id: this.props.project } });
   };
 
   updateTooltip = (selectedDate: ?Date, tooltipXPos: ?number, tooltipIdx: ?number) =>