Browse Source

Making the back button a little smarter

closed-social-v3
Kibigo 7 years ago
parent
commit
5f6f7aaa27
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      app/assets/javascripts/components/components/column_back_button.jsx

+ 2
- 1
app/assets/javascripts/components/components/column_back_button.jsx View File

@ -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 () {

Loading…
Cancel
Save