mirror of
https://github.com/flarum/core.git
synced 2025-07-25 02:31:17 +02:00
Make the back button a functional link
This commit is contained in:
@@ -85,6 +85,17 @@ export default class History {
|
||||
m.route(this.getTop().url);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the URL of the previous page.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
backUrl() {
|
||||
const secondTop = this.stack[this.stack.length - 2];
|
||||
|
||||
return secondTop.url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Go to the first route in the history stack.
|
||||
*
|
||||
|
Reference in New Issue
Block a user