Skip to content

Commit

Permalink
replace if with ??
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyr-basiuk committed Sep 5, 2024
1 parent bd64665 commit 207ce50
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/credentials/credential-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,7 @@ export class CredentialWallet implements ICredentialWallet {
if (!schema.$metadata.uris['jsonLdContext']) {
throw new Error('jsonLdContext is missing is the schema');
}
if (!request.context) {
request.context = [];
}
request.context = request.context ?? [];
if (
request.displayMethod?.type === DisplayMethodType.Iden3BasicDisplayMethodV1 &&
!request.context.includes(VerifiableConstants.JSONLD_SCHEMA.IDEN3_DISPLAY_METHOD)
Expand Down

0 comments on commit 207ce50

Please sign in to comment.