From dbeb0dde87c125d0d89d8475c935465542ed711f Mon Sep 17 00:00:00 2001 From: NikolaBorislavovHristov Date: Fri, 29 Jun 2018 15:47:47 +0300 Subject: [PATCH] isBackAction changed to isPushAction --- src/common/Router/Router.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/Router/Router.js b/src/common/Router/Router.js index c98a7670a..9c14508e8 100644 --- a/src/common/Router/Router.js +++ b/src/common/Router/Router.js @@ -32,7 +32,7 @@ class Router extends Component { const hashIndex = window.location.href.indexOf('#'); const hashPath = hashIndex === -1 ? '' : window.location.href.substring(hashIndex + 1); const path = joinPaths('/', hashPath); - const isBackAction = this.historyLength === history.length; + const isPushAction = this.historyLength < history.length; this.historyLength = history.length; this.props.config.views.forEach((viewConfig, viewConfigIndex) => { viewConfig.routes.forEach((routeConfig) => { @@ -45,7 +45,7 @@ class Router extends Component { element: null }; } else if (viewIndex === viewConfigIndex) { - if (isBackAction && React.isValidElement(view.element) && view.element.type === routeConfig.component) { + if (!isPushAction && React.isValidElement(view.element) && view.element.type === routeConfig.component) { return view; } else { return {