diff --git a/apps/nunjucks-filters/src/customFilters.js b/apps/nunjucks-filters/src/customFilters.js index 670554fa3..7d5339f17 100644 --- a/apps/nunjucks-filters/src/customFilters.js +++ b/apps/nunjucks-filters/src/customFilters.js @@ -198,7 +198,7 @@ function replaceServerVariablesWithValues(url, serverVariables) { const getVariableValue = (object, variable) => { const keyValue = object[variable]._json; - if (keyValue) return keyValue.default || (keyValue.enum && keyValue.enum[0]); + if (keyValue) return keyValue.default ?? keyValue.enum?.[0]; }; const urlVariables = getVariablesNamesFromUrl(url);