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

Add checks for null options (since typeof null === "object") #288

Merged
merged 1 commit into from Jul 14, 2018

Conversation

ralphtheninja
Copy link
Member

Closes #283

@ralphtheninja ralphtheninja added this to Backlog in Level (old board) via automation Jul 14, 2018
@ralphtheninja ralphtheninja moved this from Backlog to Review in Level (old board) Jul 14, 2018
@@ -142,7 +142,7 @@ AbstractLevelDOWN.prototype.batch = function (array, options, callback) {
return process.nextTick(callback, new Error('batch(array) requires an array argument'))
}

if (!options || typeof options !== 'object') { options = {} }
if (typeof options !== 'object' || options === null) options = {}
Copy link
Member Author

Choose a reason for hiding this comment

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

Changed this for consistency

@ralphtheninja ralphtheninja merged commit f891f39 into master Jul 14, 2018
Level (old board) automation moved this from Review to Done Jul 14, 2018
@ralphtheninja ralphtheninja deleted the check-null-options branch July 14, 2018 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants