Skip to content

Commit

Permalink
Merge branch 'master' into chore/simplify-variable-initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
thebedigupta authored Oct 8, 2024
2 parents 60119fa + 5c28787 commit 3b43b8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ extends:
- plugin:sonarjs/recommended

parserOptions:
ecmaVersion: 2018
ecmaVersion: 2020
sourceType: module
ecmaFeatures:
jsx: true
Expand Down
2 changes: 1 addition & 1 deletion apps/nunjucks-filters/src/customFilters.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3b43b8d

Please sign in to comment.