Skip to content

Commit

Permalink
Visit home page if no previous route exists
Browse files Browse the repository at this point in the history
Fixes #1777
  • Loading branch information
dsevillamartin committed Jun 27, 2019
1 parent a6aa285 commit 985b87d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/src/forum/utils/History.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ export default class History {
* @public
*/
back() {
if (! this.canGoBack()) {
return this.home();
}

this.stack.pop();

m.route(this.getCurrent().url);
Expand Down

0 comments on commit 985b87d

Please sign in to comment.