Skip to content

Commit

Permalink
Merge pull request #442 from KBroichhausen/comparison-with-false-values
Browse files Browse the repository at this point in the history
Fix for  #431
  • Loading branch information
ebrehault authored Jul 15, 2022
2 parents 5adcaba + 29f7137 commit b06f22a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/schema-form/src/lib/model/formproperty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export abstract class FormProperty {
if (typeof expString === 'boolean') {
valid = !expString ? !value : value
} else if (typeof expString === 'number') {
valid = !!value ? `${expString}` === `${value}` : false;
valid = (!!value || value == 0) ? `${expString}` === `${value}` : false;
} else if (-1 !== `${expString}`.indexOf('$ANY$')) {
if(Array.isArray(value)) {
valid = value.length > 0;
Expand Down

0 comments on commit b06f22a

Please sign in to comment.