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 4668a6e commit d878ab2
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 @@ -698,7 +698,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 d878ab2

Please sign in to comment.