Skip to content

Commit

Permalink
drop the spread, use object.assign
Browse files Browse the repository at this point in the history
  • Loading branch information
jonchurch committed Aug 1, 2024
1 parent 48dfbd5 commit 1abae7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ res.get = function(field){

res.clearCookie = function clearCookie(name, options) {
// Force cookie expiration by setting expires to the past
const opts = { path: '/', ...options, expires: new Date(1) }
const opts = Object.assign({ path: '/' } , options, { expires: new Date(1) })
// ensure maxAge is not passed
delete opts.maxAge

Expand Down

0 comments on commit 1abae7a

Please sign in to comment.