From bf76689d33c2c711d9b2656f9585c33903787ec6 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Mon, 18 Dec 2023 14:19:51 -0300 Subject: [PATCH] Code style refactor --- src/asyncActions.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/asyncActions.ts b/src/asyncActions.ts index 7f63093..7a3b828 100644 --- a/src/asyncActions.ts +++ b/src/asyncActions.ts @@ -91,9 +91,13 @@ export function initSplitSdk(params: IInitSplitSdkParams): (dispatch: Dispatch { - return params.splitNames ? - { ...acc, ...client.getTreatmentsWithConfig(params.splitNames as string[], params.attributes) } : - { ...acc, ...client.getTreatmentsWithConfigByFlagSets(params.flagSets as string[], params.attributes) }; + return { + ...acc, + ...(params.splitNames ? + client.getTreatmentsWithConfig(params.splitNames as string[], params.attributes) : + client.getTreatmentsWithConfigByFlagSets(params.flagSets as string[], params.attributes) + ) + }; }, {}); }