Skip to content

Commit

Permalink
fix: array access for config in deleteTicketByDecodedTokenOrId
Browse files Browse the repository at this point in the history
  • Loading branch information
micwallace committed Aug 25, 2023
1 parent 928eeee commit e7cc143
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/outlet/ticketStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ export class TicketStorage {
}

public deleteTicketByDecodedTokenOrId(collectionId: string, decodedTokenOrId: DecodedToken | string) {
const hashes = createIssuerHashArray(this.config.issuers[collectionId])
const config = this.config.issuers.find((issuer) => issuer.collectionID === collectionId)
const hashes = createIssuerHashArray(config)
const tokenId = typeof decodedTokenOrId === 'string' ? decodedTokenOrId : decodedTokenOrId.tokenId

for (const hash of hashes) {
Expand Down

0 comments on commit e7cc143

Please sign in to comment.