isNonEmptyArray => arrayLength

This commit is contained in:
djmaze 2021-07-21 21:34:17 +02:00
parent 1e49c1a6ac
commit 5590fd4860
20 changed files with 68 additions and 74 deletions

View file

@ -1,6 +1,6 @@
import ko from 'ko';
import { isNonEmptyArray } from 'Common/Utils';
import { arrayLength } from 'Common/Utils';
import { AbstractModel } from 'Knoin/AbstractModel';
import { PgpUserStore } from 'Stores/User/Pgp';
@ -21,7 +21,7 @@ export class OpenPgpKeyModel extends AbstractModel {
this.index = index;
this.id = ID;
this.ids = isNonEmptyArray(IDs) ? IDs : [ID];
this.ids = arrayLength(IDs) ? IDs : [ID];
this.guid = guID;
this.user = '';
this.users = userIDs;