Skip to content

Commit

Permalink
Merge pull request #190 from InseeFrLab/fix_bool_in_url
Browse files Browse the repository at this point in the history
Use nullish coalescing (??) instead of OR (||)
  • Loading branch information
garronej authored Dec 18, 2020
2 parents c98afee + 1383133 commit 912c9a2
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,10 @@ const arrayToObject =
const fromParams = getFromQueryParams(queryParams);
fields.forEach(({ path, field }) =>
obj[path] =
fromParams(path)(field) ||
mustacheRender(field as any, buildMustacheViewParams) ||
getDefaultSingleOption(field)
fromParams(path)(field) ?? (
mustacheRender(field as any, buildMustacheViewParams) ||
getDefaultSingleOption(field)
)
);
return obj;
};
Expand Down

0 comments on commit 912c9a2

Please sign in to comment.