diff --git a/.eslintrc.js b/.eslintrc.js index 2cbc020ed844954fee7f93bfafc07509dd6a9352..7195bf9c036c34a5f76b7e01f0dab71503d9d750 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -78,6 +78,7 @@ module.exports = { '@eslint-react/dom/no-dangerously-set-innerhtml': 0, // used for for injecting html tags '@eslint-react/no-array-index-key': 0, '@eslint-react/no-unused-class-component-members': 0, // disabled for ".d.ts" files + '@eslint-react/no-leaked-conditional-rendering': 'error', // important ! avoids rendering 0 }, }, { diff --git a/src/components/Charts/Bar.tsx b/src/components/Charts/Bar.tsx index 0df625082cc811184fe7c964128f70ee56ab9fe2..bb1ae9fa372979807edfed750611f3fdb1a3b40b 100644 --- a/src/components/Charts/Bar.tsx +++ b/src/components/Charts/Bar.tsx @@ -293,9 +293,7 @@ const Bar = ({ /> </g> ) : ( - height > 0 && - dataload.value && - dataload.value >= 0 && ( + Boolean(height > 0 && dataload.value && dataload.value >= 0) && ( // default colored bar <g className="barValue" diff --git a/src/components/Options/ProfileTypeOptions/ProfileTypeOptions.tsx b/src/components/Options/ProfileTypeOptions/ProfileTypeOptions.tsx index 604c357352c13268cf64a2ea564676f2575d9886..7ab2149c886c8d15b7d1c28df58bdce0135680f2 100644 --- a/src/components/Options/ProfileTypeOptions/ProfileTypeOptions.tsx +++ b/src/components/Options/ProfileTypeOptions/ProfileTypeOptions.tsx @@ -97,7 +97,7 @@ const ProfileTypeOptions = () => { <div className="value"> {t(`profile_type.housing_type.${profileType.housingType}`)} </div> - {profileType.constructionYear && ( + {Boolean(profileType.constructionYear) && ( <div className="value"> {t( `profile_type.construction_year.${