Skip to content

Commit

Permalink
CR - handle undefined identity
Browse files Browse the repository at this point in the history
Signed-off-by: shirady <[email protected]>
  • Loading branch information
shirady committed Jan 6, 2025
1 parent 5a85901 commit 4c9bd54
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sdk/config_fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,9 @@ class ConfigFS {
let identity;
try {
identity = await this.get_identity_by_id(id, type, options);
if (!identity && options.silent_if_missing) {
return undefined; // we don't have the identity, so we can't add the property of stat to it
}
const stat = await this.stat_account_config_file_by_identity(id, identity.name);
identity.stat = stat;
return identity; // this identity object should have also a stat property
Expand Down

0 comments on commit 4c9bd54

Please sign in to comment.