From 1f196e4d42302cfb65c67b8855637bd3533bc0c1 Mon Sep 17 00:00:00 2001 From: James Chartrand Date: Wed, 9 Oct 2024 14:45:13 -0400 Subject: [PATCH] fix issuer error when string --- src/issue.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/issue.js b/src/issue.js index 8fdedfd..f6a314e 100644 --- a/src/issue.js +++ b/src/issue.js @@ -56,11 +56,11 @@ const issue = async (unsignedVerifiableCredential, instanceId) => { return signedVerifiableCredential } -const addIssuerId = (vc, issuerId) => { - if (vc.issuer && typeof vc.issuer === 'string') { - vc.issuer = issuerId +const addIssuerId = (credential, issuerId) => { + if (credential.issuer && typeof credential.issuer === 'string') { + credential.issuer = issuerId } else { - ;(vc.issuer ??= {}).id = issuerId + ;(credential.issuer ??= {}).id = issuerId } }