From 413bef83277b0623b319f0c651448b0eaf39048a Mon Sep 17 00:00:00 2001 From: Pawel Kowalczyk Date: Thu, 13 Dec 2018 16:10:09 +0100 Subject: [PATCH] deleted-unnecessary-code Feature #14489 Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk --- src/store/dialog/dialog-reducer.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/store/dialog/dialog-reducer.ts b/src/store/dialog/dialog-reducer.ts index 775a4d5f..30368685 100644 --- a/src/store/dialog/dialog-reducer.ts +++ b/src/store/dialog/dialog-reducer.ts @@ -11,9 +11,7 @@ export interface Dialog { data: T; } -const initialState: DialogState = {}; - -export const dialogReducer = (state: DialogState = initialState, action: DialogAction) => +export const dialogReducer = (state: DialogState = {}, action: DialogAction) => dialogActions.match(action, { OPEN_DIALOG: ({ id, data }) => ({ ...state, [id]: { open: true, data } }), @@ -21,7 +19,7 @@ export const dialogReducer = (state: DialogState = initialState, action: DialogA ...state, [id]: state[id] ? { ...state[id], open: false } : { open: false, data: {} } }), - CLOSE_ALL_DIALOGS: () => ({ ...initialState }), + CLOSE_ALL_DIALOGS: () => ({ }), default: () => state, }); -- 2.30.2