mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 21:49:21 +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,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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue