From 2d7616466623fea7c416cccf452d1812fef8c46b Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Sun, 17 Dec 2017 13:37:22 +0000 Subject: [PATCH] Fix the back button to work on first load too. --- src/App.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index 591e487..a4efeb3 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -93,7 +93,10 @@ const AppBarWitHistory = withRouter( } canGoBack() { - return this.props.history!.location.pathname !== routeResolver.getRoute('pim'); + return ( + (this.props.history!.location.pathname !== routeResolver.getRoute('pim')) && + (this.props.history!.location.pathname !== routeResolver.getRoute('home')) + ); } goBack() {