1
0
mirror of https://github.com/funamitech/mastodon synced 2024-11-28 14:58:38 +09:00

Merge pull request #660 from marrus-sh/mastodon-smart-back-button

#467 – Making the back button a little smarter
This commit is contained in:
Eugen 2017-03-01 10:50:27 +01:00 committed by GitHub
commit 0924eee81b

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