Skip to content

Commit

Permalink
perf: Remove double-stringify in setCookie (nodejs#2980)
Browse files Browse the repository at this point in the history
* Remove double-stringify in setCookie

* Remove unnecessary semicolon
  • Loading branch information
peterver authored and Mert Can Altin committed Mar 26, 2024
1 parent 3219a3f commit 2042bbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/web/cookies/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function setCookie (headers, cookie) {
const str = stringify(cookie)

if (str) {
headers.append('Set-Cookie', stringify(cookie))
headers.append('Set-Cookie', str)
}
}

Expand Down

0 comments on commit 2042bbe

Please sign in to comment.