0
0
Fork 0

Do not leave Mastodon when clicking “Back” (#23953)

This commit is contained in:
Christian Schmidt 2023-03-04 23:18:19 +01:00 committed by GitHub
parent c599e289d8
commit cb868228bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 15 deletions

View file

@ -474,10 +474,10 @@ class UI extends React.PureComponent {
};
handleHotkeyBack = () => {
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('/');
}
};