1
0
mirror of https://github.com/whippyshou/mastodon synced 2024-12-01 16:28:29 +09:00

Making the back button a little smarter

This commit is contained in:
Kibigo 2017-02-28 22:24:34 -08:00
parent 5960bac11e
commit 5f6f7aaa27

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