From b1ab22e63bba4a4b7629ea69108d9c57a4e7f5d8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9goire=20Aubert?= Date: Mon, 7 Aug 2017 10:20:09 +0200 Subject: [PATCH] SONAR-9603 Fix broken browser history after clicking on the project activity preview graph --- .../src/main/js/apps/overview/events/AnalysesList.js | 2 +- .../src/main/js/apps/overview/events/PreviewGraph.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/overview/events/AnalysesList.js b/server/sonar-web/src/main/js/apps/overview/events/AnalysesList.js index a52e8fc6a74..5e6004a3aae 100644 --- a/server/sonar-web/src/main/js/apps/overview/events/AnalysesList.js +++ b/server/sonar-web/src/main/js/apps/overview/events/AnalysesList.js @@ -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 = { diff --git a/server/sonar-web/src/main/js/apps/overview/events/PreviewGraph.js b/server/sonar-web/src/main/js/apps/overview/events/PreviewGraph.js index 5ecdab56437..56b92e0397d 100644 --- a/server/sonar-web/src/main/js/apps/overview/events/PreviewGraph.js +++ b/server/sonar-web/src/main/js/apps/overview/events/PreviewGraph.js @@ -41,7 +41,7 @@ type Props = { history: ?History, metrics: Array, 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) => -- 2.39.5