1
0
mirror of https://github.com/flarum/core.git synced 2025-08-11 10:55:47 +02:00

update: forum/utils/History.js

This commit is contained in:
Matthew Kilgore
2020-08-07 20:38:37 -04:00
committed by Franz Liedke
parent 439e3a5a9a
commit 9ac8f1543a

View File

@@ -49,7 +49,7 @@ export default class History {
* not provided.
* @public
*/
push(name, title, url = m.route()) {
push(name, title, url = m.route.get()) {
// If we're pushing an item with the same name as second-to-top item in the
// stack, we will assume that the user has clicked the 'back' button in
// their browser. In this case, we don't want to push a new item, so we will
@@ -92,7 +92,7 @@ export default class History {
this.stack.pop();
m.route(this.getCurrent().url);
m.route.set(this.getCurrent().url);
}
/**
@@ -114,6 +114,6 @@ export default class History {
home() {
this.stack.splice(0);
m.route('/');
m.route.set('/');
}
}