diff options
author | Christian Schmidt <github@chsc.dk> | 2023-03-04 23:18:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-04 23:18:19 +0100 |
commit | cb868228bde5351b79041f341a151bb08118d31f (patch) | |
tree | 08fb1d0cd8b7a700278e28f107ef5f7e332a7f81 /app/javascript/mastodon/components/column_back_button.jsx | |
parent | c599e289d806f6d13e3383879750db053a654821 (diff) |
Do not leave Mastodon when clicking “Back” (#23953)
Diffstat (limited to 'app/javascript/mastodon/components/column_back_button.jsx')
-rw-r--r-- | app/javascript/mastodon/components/column_back_button.jsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/javascript/mastodon/components/column_back_button.jsx b/app/javascript/mastodon/components/column_back_button.jsx index 5bbf11652..5c5226b7e 100644 --- a/app/javascript/mastodon/components/column_back_button.jsx +++ b/app/javascript/mastodon/components/column_back_button.jsx @@ -15,10 +15,10 @@ export default class ColumnBackButton extends React.PureComponent { }; handleClick = () => { - if (window.history && window.history.length === 1) { - this.context.router.history.push('/'); - } else { + if (window.history && window.history.state) { this.context.router.history.goBack(); + } else { + this.context.router.history.push('/'); } }; |