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 80a3d68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ root: true
env:
es6: true
node: true
languageOptions:
ecmaVersion: 2022
rules:
eol-last: error
eqeqeq: [error, allow-null]
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 80a3d68

Please sign in to comment.