Skip to content
Snippets Groups Projects
Commit 5f6f7aaa authored by Kibigo's avatar Kibigo
Browse files

Making the back button a little smarter

parent 5960bac1
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,8 @@ const ColumnBackButton = React.createClass({
mixins: [PureRenderMixin],
handleClick () {
this.context.router.goBack();
if (window.history && window.history.length == 1) this.context.router.push("/");
else this.context.router.goBack();
},
render () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment