diff options
author | Eugen <eugen@zeonfederated.com> | 2017-03-01 10:50:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-01 10:50:27 +0100 |
commit | 0924eee81baf8f864449b616532589a9213bca57 (patch) | |
tree | a7b023cb3c575d6e8fc1dee00a6fdcda9d1d2fb0 | |
parent | 5960bac11ea62f9066b338ecef46733fea85b1f6 (diff) | |
parent | 5f6f7aaa27d165b65c19e1df3e383867570a1bc2 (diff) |
Merge pull request #660 from marrus-sh/mastodon-smart-back-button
#467 – Making the back button a little smarter
-rw-r--r-- | app/assets/javascripts/components/components/column_back_button.jsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/components/components/column_back_button.jsx b/app/assets/javascripts/components/components/column_back_button.jsx index 6abf11239..6b5ffee53 100644 --- a/app/assets/javascripts/components/components/column_back_button.jsx +++ b/app/assets/javascripts/components/components/column_back_button.jsx @@ -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 () { |