Skip to content

Commit

Permalink
fix: handle undefined for card (#19)
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Glastra <[email protected]>
  • Loading branch information
TimoGlastra authored Aug 19, 2024
1 parent 955dbd1 commit 11bda72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AusweisAuthFlow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export class AusweisAuthFlow {

if (message.msg === 'READER') {
// If card is empty object the card is unknown, we see that as no card attached for this flow
const isCardAttached = message.card !== null && Object.keys(message.card).length > 0
const isCardAttached = message.card !== null && message.card !== undefined && Object.keys(message.card).length > 0

this.options.onCardAttachedChanged?.({
isCardAttached,
Expand Down

0 comments on commit 11bda72

Please sign in to comment.