From d878ab241d86b59e7715a61a4bfdd59363ec75f5 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Thu, 1 Aug 2024 17:01:43 -0400 Subject: [PATCH] drop the spread, use object.assign --- lib/response.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/response.js b/lib/response.js index 923fa656fa..649cf36431 100644 --- a/lib/response.js +++ b/lib/response.js @@ -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