From 839798dba65fa7d3d16c3f41f4c7273405c57857 Mon Sep 17 00:00:00 2001 From: Konstantin Markov Date: Tue, 23 Jul 2024 10:45:24 +0300 Subject: [PATCH] Fix coverage crashing the page, if genre is not setup present (#2034) --- client/reducers/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/reducers/index.ts b/client/reducers/index.ts index 110bb2571..d0aaf066a 100644 --- a/client/reducers/index.ts +++ b/client/reducers/index.ts @@ -20,6 +20,7 @@ import contacts from './contacts'; import locations from './locations'; const returnState = (state) => state || {}; +const returnGenreState = (state) => state ?? []; const planningApp = combineReducers({ modal: modal, @@ -45,7 +46,7 @@ const planningApp = combineReducers({ ingest: returnState, privileges: returnState, subjects: returnState, - genres: returnState, + genres: returnGenreState, users: returnState, desks: returnState, urgency: returnState,