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,4 +1,4 @@
import { addObservablesTo, addComputablesTo } from 'Common/Utils';
import { isArray, addObservablesTo, addComputablesTo } from 'Common/Utils';
function dispose(disposable) {
if (disposable && 'function' === typeof disposable.dispose) {
@ -16,7 +16,7 @@ function typeCast(curValue, newValue) {
if (curValue.constructor.reviveFromJson) {
return curValue.constructor.reviveFromJson(newValue);
}
if (Array.isArray(curValue) && !Array.isArray(newValue))
if (isArray(curValue) && !isArray(newValue))
return [];
}
return newValue;