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

Handle boolean params with false default values #1352

Merged

Conversation

matthewmcgarvey
Copy link
Member

Purpose

Fixes #1351

Description

Three places were using the truthiness of param default values when they shouldn't have been. This causes problems when dealing with boolean params. The solution was to always check if the value is a Nop instead.

Checklist

  • - An issue already exists detailing the issue/or feature request that this PR fixes
  • - All specs are formatted with crystal tool format spec src
  • - Inline documentation has been added and/or updated
  • - Lucky builds on docker with ./script/setup
  • - All builds and specs pass on docker with ./script/test

Copy link
Member

@jwoertink jwoertink left a comment

Choose a reason for hiding this comment

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

Interesting. I've never seen the Nop before.

@matthewmcgarvey matthewmcgarvey merged commit 49f1021 into luckyframework:master Dec 7, 2020
@matthewmcgarvey matthewmcgarvey deleted the boolean-params branch December 7, 2020 16:37
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.

Boolean action params don't work with false default value
2 participants