Array.isArray to isArray

Array.isNotEmpty to isNonEmptyArray
This commit is contained in:
djmaze 2021-03-16 16:49:14 +01:00
parent 986b8f056b
commit 0b64083543
30 changed files with 82 additions and 69 deletions

View file

@ -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);