diff --git a/src/verifier.js b/src/verifier.js index f7d36fb..a6b0823 100644 --- a/src/verifier.js +++ b/src/verifier.js @@ -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,