From c7e508b89060e0084db2c3443ebfc12e2d7aad9f Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Sun, 17 Dec 2017 15:28:36 +0000 Subject: [PATCH] Also disable back when we have no history stack. This is useful for when we open a page directly in an inner link. --- src/App.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/App.tsx b/src/App.tsx index a4efeb3..2be9298 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -94,6 +94,7 @@ const AppBarWitHistory = withRouter( canGoBack() { return ( + (this.props.history!.length > 1) && (this.props.history!.location.pathname !== routeResolver.getRoute('pim')) && (this.props.history!.location.pathname !== routeResolver.getRoute('home')) );