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

Fix res.send() without arguments #22

Closed
wants to merge 1 commit into from
Closed

Fix res.send() without arguments #22

wants to merge 1 commit into from

Conversation

gmiroshnykov
Copy link

Vanilla res.send() without arguments should return HTTP 200 with no body, but before this patch express-mongoose was crashing with the following error:

TypeError: Cannot read property 'constructor' of undefined
    at ServerResponse.expressmongoose_send [as send]
    (/path/to/node_modules/express-mongoose/index.js:69:26)

Vanilla `res.send()` without arguments should return HTTP 200 with
no body, but before this patch express-mongoose was crashing
with the following error:

    TypeError: Cannot read property 'constructor' of undefined
        at ServerResponse.expressmongoose_send [as send]
        (/path/to/node_modules/express-mongoose/index.js:69:26)
@aheckmann
Copy link
Contributor

please add a test confirming the change.

@soplakanets
Copy link
Contributor

Just create a #25 which fixes same issue and includes tests.

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

3 participants