Skip to content

fix (typed audience evaluation): When evaluating exact match condition, properly check type of condition value #178

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

Merged
merged 1 commit into from
Oct 23, 2018

Conversation

mjc1283
Copy link
Contributor

@mjc1283 mjc1283 commented Oct 22, 2018

Summary

Fixes a bug in evaluation of exact match conditions. Before this change, evaluation of a condition with a wrongly-typed value property could return a boolean, when it should abort and return null. With this change, when condition.value of an exact match condition is not a string, boolean, or finite number, the condition will evaluate to null.

Test Plan

  • Added a test for an exact match condition with a wrongly-typed value
  • Also added tests for wrongly-typed condition values in 'greater than' and 'less than' conditions

@mjc1283 mjc1283 self-assigned this Oct 22, 2018
@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 97.432% when pulling 35375e7 on mcarroll/exact-match-condition-value-type-check into cb9d500 on master.

3 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 97.432% when pulling 35375e7 on mcarroll/exact-match-condition-value-type-check into cb9d500 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 97.432% when pulling 35375e7 on mcarroll/exact-match-condition-value-type-check into cb9d500 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 97.432% when pulling 35375e7 on mcarroll/exact-match-condition-value-type-check into cb9d500 on master.

Copy link
Contributor

@mikeproeng37 mikeproeng37 left a comment

Choose a reason for hiding this comment

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

Ah, nice catch.

@mjc1283
Copy link
Contributor Author

mjc1283 commented Oct 23, 2018

build

@mjc1283 mjc1283 merged commit 39ce59b into master Oct 23, 2018
@mjc1283 mjc1283 deleted the mcarroll/exact-match-condition-value-type-check branch October 23, 2018 17:20
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.

3 participants