Skip to content

Commit

Permalink
♻️ use spread, update supported ecmascript version
Browse files Browse the repository at this point in the history
  • Loading branch information
ctcpip committed Aug 2, 2024
1 parent b4d3709 commit 4feefb9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
root: true
env:
es6: true
es2022: true
node: true
rules:
eol-last: error
Expand Down
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 = Object.assign({ path: '/' } , options, { expires: new Date(1) })
const opts = { path: '/', ...options, expires: new Date(1)};
// ensure maxAge is not passed
delete opts.maxAge

Expand Down

0 comments on commit 4feefb9

Please sign in to comment.