From 0555c9a97e83720575d00a7b46db39f35f4aa036 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 19 Oct 2021 20:49:36 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Set=20a=20default=20value=20for?= =?UTF-8?q?=20reduce?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/group/GroupCreateBox.tsx | 2 +- frontend/src/contexts/cache.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/group/GroupCreateBox.tsx b/frontend/src/components/group/GroupCreateBox.tsx index ea501cc..40a9cf5 100644 --- a/frontend/src/components/group/GroupCreateBox.tsx +++ b/frontend/src/components/group/GroupCreateBox.tsx @@ -93,7 +93,7 @@ export function GroupCreateBox({viewSet, resource}: GroupCreateBoxProps): JSX.El return obj }).reduce((a, b) => { return {...a, ...b} - }), + }, {}), [authorization, cache], ) diff --git a/frontend/src/contexts/cache.tsx b/frontend/src/contexts/cache.tsx index 58749cd..ffbb27d 100644 --- a/frontend/src/contexts/cache.tsx +++ b/frontend/src/contexts/cache.tsx @@ -45,7 +45,7 @@ export function CacheProvider({children}: WithChildren): JSX.Element { return obj }).reduce((a, b) => { return {...a, ...b} - }) + }, {}) }, [users], )