Also disable back when we have no history stack.

This is useful for when we open a page directly in an inner link.
master
Tom Hacohen 2017-12-17 15:28:36 +00:00
parent 50af0ac0d1
commit c7e508b890
1 changed files with 1 additions and 0 deletions

View File

@ -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'))
);