mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 06:27:02 +03:00
Array.isArray to isArray
Array.isNotEmpty to isNonEmptyArray
This commit is contained in:
parent
986b8f056b
commit
0b64083543
30 changed files with 82 additions and 69 deletions
|
|
@ -1,8 +1,10 @@
|
|||
import { isArray, isNonEmptyArray } from 'Common/Utils';
|
||||
|
||||
export class AbstractScreen {
|
||||
constructor(screenName, viewModels = []) {
|
||||
this.oCross = null;
|
||||
this.sScreenName = screenName;
|
||||
this.aViewModels = Array.isArray(viewModels) ? viewModels : [];
|
||||
this.aViewModels = isArray(viewModels) ? viewModels : [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -40,7 +42,7 @@ export class AbstractScreen {
|
|||
if (!this.__started) {
|
||||
this.__started = true;
|
||||
const routes = this.routes();
|
||||
if (Array.isNotEmpty(routes)) {
|
||||
if (isNonEmptyArray(routes)) {
|
||||
let route = new Crossroads(),
|
||||
fMatcher = (this.onRoute || (()=>{})).bind(this);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue