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

Treat if merge with false string as false #4569

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

humandad
Copy link
Contributor

@humandad humandad commented Feb 5, 2025

What does this PR do?

We have an $If{} merge that accepts a three-part value. First a condition, and then an if_true_merge and finally, and if_false_merge.

Since we merge into template strings in multiple stages, merges in the condition could result in the string "false". These conditions should still trigger the "false" condition, not the "true" condition.

Example Merge:

$If{[$Prop{collapsed}][trueValue][falseValue]}

If $Prop{collapsed} resolves to the string "false" we want the falseValue to be the final result of the if merge.

@humandad humandad requested a review from techfg February 5, 2025 19:16
@humandad humandad self-assigned this Feb 5, 2025
@humandad humandad merged commit 32ff5c0 into main Feb 6, 2025
5 checks passed
@humandad humandad deleted the fix-treat-if-merge-with-false-string-as-false branch February 6, 2025 14:04
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