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

Do not match with boolean #3

Merged
merged 1 commit into from
Apr 6, 2018
Merged

Do not match with boolean #3

merged 1 commit into from
Apr 6, 2018

Conversation

robinvdvleuten
Copy link
Contributor

@robinvdvleuten robinvdvleuten commented Apr 6, 2018

The provided example fastify.assert(req.headers.authorization, 400) won't work this way because the string as a header was compared with a boolean. With this PR, it will behave the exact way as the http-assert package and allow any truthy value.

Copy link
Member

@delvedor delvedor left a comment

Choose a reason for hiding this comment

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

Nice catch!

@delvedor delvedor merged commit a03908c into fastify:master Apr 6, 2018
@robinvdvleuten robinvdvleuten deleted the condition branch April 6, 2018 12:05
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.

2 participants