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(write_concern): avoid throwing error when options is null #2714

Merged
merged 1 commit into from
Jan 29, 2021
Merged

fix(write_concern): avoid throwing error when options is null #2714

merged 1 commit into from
Jan 29, 2021

Conversation

vkarpov15
Copy link
Contributor

Description

What changed?

If you call createCollection() with null for options, you get a "Cannot read property 'writeConcern' of null" error. Not a problem in TypeScript because technically this function doesn't accept null as a parameter, but might be worth fixing in case JS developers run into it.

Are there any files to ignore?

Copy link
Contributor

@emadum emadum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Contributor

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I'm betting we have a few other places where we're stricter than needed so I created NODE-3058

@nbbeeken nbbeeken merged commit ea142bc into mongodb:4.0 Jan 29, 2021
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.

4 participants