mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-12-23 05:37:47 +00:00
Making the back button a little smarter
This commit is contained in:
parent
5960bac11e
commit
5f6f7aaa27
|
@ -15,7 +15,8 @@ const ColumnBackButton = React.createClass({
|
||||||
mixins: [PureRenderMixin],
|
mixins: [PureRenderMixin],
|
||||||
|
|
||||||
handleClick () {
|
handleClick () {
|
||||||
this.context.router.goBack();
|
if (window.history && window.history.length == 1) this.context.router.push("/");
|
||||||
|
else this.context.router.goBack();
|
||||||
},
|
},
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
|
|
Loading…
Reference in a new issue