mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 22:17:03 +03:00
prettier --write
This commit is contained in:
parent
450528ff00
commit
8a0be3212d
164 changed files with 7053 additions and 9008 deletions
|
|
@ -1,16 +1,13 @@
|
|||
|
||||
import _ from '_';
|
||||
import crossroads from 'crossroads';
|
||||
import {isArray, isNonEmptyArray, noop} from 'Common/Utils';
|
||||
import { isArray, isNonEmptyArray, noop } from 'Common/Utils';
|
||||
|
||||
export class AbstractScreen
|
||||
{
|
||||
export class AbstractScreen {
|
||||
oCross = null;
|
||||
sScreenName;
|
||||
aViewModels;
|
||||
|
||||
constructor(screenName, viewModels = [])
|
||||
{
|
||||
constructor(screenName, viewModels = []) {
|
||||
this.sScreenName = screenName;
|
||||
this.aViewModels = isArray(viewModels) ? viewModels : [];
|
||||
}
|
||||
|
|
@ -47,19 +44,16 @@ export class AbstractScreen
|
|||
* @returns {void}
|
||||
*/
|
||||
__start() {
|
||||
let
|
||||
route = null,
|
||||
let route = null,
|
||||
fMatcher = null;
|
||||
const routes = this.routes();
|
||||
|
||||
if (isNonEmptyArray(routes))
|
||||
{
|
||||
if (isNonEmptyArray(routes)) {
|
||||
fMatcher = _.bind(this.onRoute || noop, this);
|
||||
route = crossroads.create();
|
||||
|
||||
routes.forEach((item) => {
|
||||
if (item && route)
|
||||
{
|
||||
if (item && route) {
|
||||
route.addRoute(item[0], fMatcher).rules = item[1];
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue