diff --git a/packages/siop-oid4vp/lib/authorization-response/AuthorizationResponse.ts b/packages/siop-oid4vp/lib/authorization-response/AuthorizationResponse.ts index c1c71212..09d91a6c 100644 --- a/packages/siop-oid4vp/lib/authorization-response/AuthorizationResponse.ts +++ b/packages/siop-oid4vp/lib/authorization-response/AuthorizationResponse.ts @@ -207,8 +207,8 @@ export class AuthorizationResponse { state, correlationId: verifyOpts.correlationId, ...(this.idToken && { idToken: verifiedIdToken }), - ...(oid4vp.presentationExchange && { oid4vpSubmission: oid4vp.presentationExchange }), - ...(oid4vp.dcql && { oid4vpSubmissionDcql: oid4vp.dcql }), + ...(oid4vp?.presentationExchange && { oid4vpSubmission: oid4vp.presentationExchange }), + ...(oid4vp?.dcql && { oid4vpSubmissionDcql: oid4vp.dcql }), } }