Skip to content

Don't require all keys to be configured to enable key checks (#2816) #2941

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

Merged
merged 3 commits into from
Oct 26, 2016

Conversation

steven-supersolid
Copy link
Contributor

Added a few tests to try to be descriptive about how we expect keys to behave.
Tried to make the key checking algorithm clear - could be optimised by looping just once but we are only iterating up to 4 times.

@steven-supersolid
Copy link
Contributor Author

Should fix #2816

@steven-supersolid steven-supersolid changed the title Don't require all keys to be specified to enable key checks (#2816) Don't require all keys to be configured to enable key checks (#2816) Oct 26, 2016
Copy link
Contributor

@flovilmart flovilmart left a comment

Choose a reason for hiding this comment

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

One small nit if you can :)

Thanks man!


// All keys mismatch
if (keyMismatch == keys.length) {
var oneKeyConfigured = keys.some(function(key) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can you use const?

@facebook-github-bot
Copy link

@steven-supersolid updated the pull request - view changes

@flovilmart
Copy link
Contributor

Thanks!! :)

@flovilmart flovilmart merged commit e788d49 into parse-community:master Oct 26, 2016
@steven-supersolid steven-supersolid deleted the steven.safer.key.check branch October 27, 2016 09:16
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.

3 participants