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

Already defined variable and default(omit) #56

Closed
danopt opened this issue Dec 21, 2022 · 0 comments
Closed

Already defined variable and default(omit) #56

danopt opened this issue Dec 21, 2022 · 0 comments
Assignees
Labels
feature New feature or request
Milestone

Comments

@danopt
Copy link
Member

danopt commented Dec 21, 2022

We need an improvement when we use the default(omit) filter.

The problem is once a variable is defined that could be omitted, default(omit) will not work again. It's not possible to declare the variable as "undefined" again. The filter will not work again, even if the variable is set to null or false.

The solution is simple:
Instead of default(omit) we should always use default(omit, true) or something similar.

In that case, if the variable is set to false or undefined, the parameter will be omitted.

@danopt danopt added this to the 0.1.0 milestone Dec 21, 2022
@danopt danopt added the invalid This doesn't seem right label Dec 21, 2022
@danopt danopt self-assigned this Dec 21, 2022
@danopt danopt changed the title Already defined variable fails to omit with default(omit) Already defined variable and default(omit) Dec 22, 2022
@danopt danopt added feature New feature or request and removed invalid This doesn't seem right labels Jan 9, 2023
@danopt danopt closed this as completed Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant