1
0
mirror of https://github.com/flarum/core.git synced 2025-08-05 16:07:34 +02:00

Implement default route config setting

This commit is contained in:
Toby Zerner
2015-08-06 12:18:59 +09:30
parent c8084c3925
commit 80e13ae289
6 changed files with 27 additions and 14 deletions

View File

@@ -10,7 +10,7 @@
* rather than the previous discussion.
*/
export default class History {
constructor() {
constructor(defaultRoute) {
/**
* The stack of routes that have been navigated to.
*
@@ -18,11 +18,6 @@ export default class History {
* @protected
*/
this.stack = [];
// Push the homepage as the first route, so that the user will always be
// able to click on the 'back' button to go home, regardless of which page
// they started on.
this.push('index', '/');
}
/**