Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
Add a ! sign to the first check so that it only exits the function if the cookies don't exist, since undefined/null is a falsely value
  • Loading branch information
ironswordX committed Sep 9, 2023
1 parent b4d48e3 commit 54242c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function cookieParser (secret, options) {
: [secret]

return function cookieParser (req, res, next) {
if (req.cookies) {
if (!req.cookies) {
next();
return;
}
Expand Down

0 comments on commit 54242c3

Please sign in to comment.