logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 0924eee81baf8f864449b616532589a9213bca57
parent: 5960bac11ea62f9066b338ecef46733fea85b1f6
Author: Eugen <eugen@zeonfederated.com>
Date:   Wed,  1 Mar 2017 10:50:27 +0100

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

#467 – Making the back button a little smarter

Diffstat:

Mapp/assets/javascripts/components/components/column_back_button.jsx3++-
1 file changed, 2 insertions(+), 1 deletion(-)

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