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

fix(utils): avoid to use default value for null in json-templates #2165

Merged
merged 1 commit into from
Jul 2, 2023

Conversation

mytharcher
Copy link
Contributor

Description (Bug 描述)

Null value becomes undefined and cause comparison failure.

Steps to reproduce (复现步骤)

  1. Create a condition node in workflow.
  2. Assign left operand as a nullable variable.
  3. Assign right operand as null constant.
  4. Use "Equal" method.
  5. Submit data contains the null variable (field).
  6. Condition result is false and workflow fails.

Expected behavior (预期行为)

Condition result should be true.

Actual behavior (实际行为)

Condition result is false.

Related issues (相关 issue)

None.

Reason (原因)

The logic of default assign for null value in json-templates is not correct.

Solution (解决方案)

Use different way to deal with undefined and null.

@height
Copy link

height bot commented Jul 2, 2023

This pull request has been linked to 1 task:

💡Tip: Add "Close T-813" to the pull request title or description, to a commit message, or in a comment to mark this task as "Done" when the pull request is merged.

@mytharcher mytharcher merged commit 71c6224 into main Jul 2, 2023
4 checks passed
@mytharcher mytharcher deleted the T-813 branch July 2, 2023 23:25
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.

None yet

1 participant