Skip to content

Commit

Permalink
fix the handling of falsy values in field annotations (#28753)
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-carusi-zupit authored Feb 20, 2025
1 parent 48f40fe commit 142bf95
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ function convertAnnotationsToOptions(
const result = {};
annotations.forEach(annotation => {
const annotationName = lowerFirst(annotation.optionName);
const value = annotation.optionValue ? annotation.optionValue : true;
const value = annotation.optionValue ?? true;
if (annotationName in result) {
const previousValue = result[annotationName];
if (Array.isArray(previousValue)) {
Expand Down

0 comments on commit 142bf95

Please sign in to comment.