diff options
author | David Yip <yipdw@member.fsf.org> | 2018-06-12 16:39:30 -0500 |
---|---|---|
committer | David Yip <yipdw@member.fsf.org> | 2018-06-12 16:39:30 -0500 |
commit | e931cf656d1de6d89b5b048d8f1de15be7b52690 (patch) | |
tree | b1c0c66b6a88b56c422ea8be1dbef77e42afae72 /app/javascript/flavours/glitch/components/column_back_button.js | |
parent | 97d2df77aae687c983c1294ebcd3962e4f9d985c (diff) | |
parent | 34f1fd2a621ca869c17009487e2f10063812fbd0 (diff) |
Merge remote-tracking branch 'glitchsoc/master' into 454-allow-keyword-mutes-to-skip-mentions
Conflicts: app/models/glitch/keyword_mute.rb
Diffstat (limited to 'app/javascript/flavours/glitch/components/column_back_button.js')
-rw-r--r-- | app/javascript/flavours/glitch/components/column_back_button.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/components/column_back_button.js b/app/javascript/flavours/glitch/components/column_back_button.js index 50c3bf11f..a562ef9b9 100644 --- a/app/javascript/flavours/glitch/components/column_back_button.js +++ b/app/javascript/flavours/glitch/components/column_back_button.js @@ -10,10 +10,10 @@ export default class ColumnBackButton extends React.PureComponent { handleClick = () => { // if history is exhausted, or we would leave mastodon, just go to root. - if (window.history && (window.history.length === 1 || window.history.length === window._mastoInitialHistoryLen)) { - this.context.router.history.push('/'); - } else { + if (window.history.state) { this.context.router.history.goBack(); + } else { + this.context.router.history.push('/'); } } |