mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 04:59:21 +03:00
Cleanup hash routing
This commit is contained in:
parent
939eb0fd78
commit
3757324e32
7 changed files with 8 additions and 52 deletions
|
|
@ -40,19 +40,12 @@ export class AbstractScreen {
|
|||
* @returns {void}
|
||||
*/
|
||||
__start() {
|
||||
let route = null,
|
||||
fMatcher = null;
|
||||
const routes = this.routes();
|
||||
|
||||
if (Array.isNotEmpty(routes)) {
|
||||
fMatcher = (this.onRoute || (()=>{})).bind(this);
|
||||
route = new Crossroads();
|
||||
let route = new Crossroads(),
|
||||
fMatcher = (this.onRoute || (()=>{})).bind(this);
|
||||
|
||||
routes.forEach((item) => {
|
||||
if (item && route) {
|
||||
route.addRoute(item[0], fMatcher).rules = item[1];
|
||||
}
|
||||
});
|
||||
routes.forEach(item => item && route && (route.addRoute(item[0], fMatcher).rules = item[1]));
|
||||
|
||||
this.oCross = route;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue