]> source.dussan.org Git - sonarqube.git/commitdiff
make it possible to go back after opening code/projects page
authorStas Vilchik <vilchiks@gmail.com>
Wed, 3 Feb 2016 14:40:52 +0000 (15:40 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Wed, 3 Feb 2016 15:40:34 +0000 (16:40 +0100)
server/sonar-web/src/main/js/apps/code/actions/index.js

index e39f46d0327a50c95de61ed23859c4a70b5b5ede..a89e78786f551209474a0ec030050d0a6ba1e8c8 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import _ from 'underscore';
-import { pushPath } from 'redux-simple-router';
+import { pushPath, replacePath } from 'redux-simple-router';
 
 import { getChildren, getComponent, getTree, getBreadcrumbs } from '../../../api/components';
 import { translate } from '../../../helpers/l10n';
@@ -183,6 +183,7 @@ export function initComponent (componentKey, breadcrumbs) {
     dispatch(startFetching());
     return getComponent(componentKey, METRICS_WITH_COVERAGE)
         .then(component => dispatch(initComponentAction(component, breadcrumbs)))
+        .then(() => dispatch(replacePath(getPath(componentKey))))
         .then(() => dispatch(stopFetching()));
   };
 }