Skip to content

Commit

Permalink
fix: prefer const
Browse files Browse the repository at this point in the history
  • Loading branch information
ilteoood committed Nov 13, 2024
1 parent 47d2e3d commit 6738ab4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/verifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,7 @@ module.exports = function createVerifier(options) {
validators.push({ type: 'string', claim: 'nonce', allowed: ensureStringClaimMatcher(allowedNonce) })
}

let normalizedTyp = null
if (checkTyp) {
normalizedTyp = checkTyp.toLowerCase().replace(/^application\//, '')
}
const normalizedTyp = checkTyp ? checkTyp.toLowerCase().replace(/^application\//, '') : null

const context = {
key,
Expand Down

0 comments on commit 6738ab4

Please sign in to comment.