From 142bf95aee192078eedeee1da3f1a08437c25785 Mon Sep 17 00:00:00 2001 From: Francesco Carusi <137044799+francesco-carusi-zupit@users.noreply.github.com> Date: Thu, 20 Feb 2025 19:59:50 +0100 Subject: [PATCH] fix the handling of falsy values in field annotations (#28753) --- .../parsed-jdl-to-jdl-object-converter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jdl/converters/parsed-jdl-to-jdl-object/parsed-jdl-to-jdl-object-converter.ts b/lib/jdl/converters/parsed-jdl-to-jdl-object/parsed-jdl-to-jdl-object-converter.ts index c2532f62eb06..c7627b3b04ba 100644 --- a/lib/jdl/converters/parsed-jdl-to-jdl-object/parsed-jdl-to-jdl-object-converter.ts +++ b/lib/jdl/converters/parsed-jdl-to-jdl-object/parsed-jdl-to-jdl-object-converter.ts @@ -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)) {