From 1383133ad88d8836ee0f3a97845cdca5f1d8506b Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Fri, 18 Dec 2020 17:12:27 +0100 Subject: [PATCH] Use nullish coalescing (??) instead of OR (||) --- .../leaf/deploiement/nouveau-service.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/js/components/my-lab/catalogue/catalogue-navigation/leaf/deploiement/nouveau-service.tsx b/src/js/components/my-lab/catalogue/catalogue-navigation/leaf/deploiement/nouveau-service.tsx index 033356248..b3ee17056 100644 --- a/src/js/components/my-lab/catalogue/catalogue-navigation/leaf/deploiement/nouveau-service.tsx +++ b/src/js/components/my-lab/catalogue/catalogue-navigation/leaf/deploiement/nouveau-service.tsx @@ -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; };