Skip to content

Commit

Permalink
post review
Browse files Browse the repository at this point in the history
Co-authored-by: James Sumners <[email protected]>
  • Loading branch information
mattiapv and jsumners authored Oct 6, 2023
1 parent 780fcc1 commit 5359436
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jwt.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,12 +369,12 @@ function fastifyJwt (fastify, options, next) {
const localSignOptions = convertTemporalProps(options.sign)
// New supported contract, options supports sign and can expand
options = {
sign: mergeOptionsWithKey(Object.assign({ ...signOptions }, localSignOptions), true)
sign: mergeOptionsWithKey(Object.assign({}, signOptions, localSignOptions), true)
}
} else {
const localOptions = convertTemporalProps(options)
// Original contract, options supports only sign
options = mergeOptionsWithKey(Object.assign({ ...signOptions }, localOptions), true)
options = mergeOptionsWithKey(Object.assign({}, signOptions, localOptions), true)
}

if (!payload) {
Expand Down

0 comments on commit 5359436

Please sign in to comment.