about summary refs log tree commit diff
path: root/app/javascript/mastodon/components/column_back_button.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/mastodon/components/column_back_button.jsx')
-rw-r--r--app/javascript/mastodon/components/column_back_button.jsx6
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('/');
     }
   };