Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check if cb is defined before calling in destroy #10

Merged
merged 1 commit into from Jun 25, 2022

Conversation

DBC201
Copy link
Contributor

@DBC201 DBC201 commented Jun 25, 2022

When req.session.destroy() is called without any parameter in express, cb in destroy() throws an error since it is not defined.

@TimDaub
Copy link
Member

TimDaub commented Jun 25, 2022

While this change technically is fine because it technically doesn't touch any functionality, @DBC201, I'm wondering where it is the case that function destroy is called without passing a callback function.

A few data points, why I'm confused:

@DBC201
Copy link
Contributor Author

DBC201 commented Jun 25, 2022

jdesboeufs/connect-mongo#272

mongo also does something similar, however I agree with your point that the docs say it's required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants