From 870cf9cef8e698c31aec90a68919f78ec63cfd33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rialland?= Date: Mon, 31 Oct 2022 15:28:06 +0100 Subject: [PATCH] Fix types --- site/source/reducers/companySituationReducer.ts | 2 +- site/source/storage/persistCompanySituation.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/site/source/reducers/companySituationReducer.ts b/site/source/reducers/companySituationReducer.ts index ae4508f14..cd95dd22e 100644 --- a/site/source/reducers/companySituationReducer.ts +++ b/site/source/reducers/companySituationReducer.ts @@ -44,7 +44,7 @@ export function companySituation(state: Situation = {}, action: Action) { } break case 'DELETE_FROM_SITUATION': { - return omit({ ...state }, action.fieldName) + return omit({ ...state }, action.fieldName) as Situation } case 'COMPANY::SET_EXISTING_COMPANY': return getCompanySituation(action.entreprise) diff --git a/site/source/storage/persistCompanySituation.ts b/site/source/storage/persistCompanySituation.ts index 08e2cdf4a..c1c6c316f 100644 --- a/site/source/storage/persistCompanySituation.ts +++ b/site/source/storage/persistCompanySituation.ts @@ -22,7 +22,7 @@ export function setupCompanySituationPersistence( store.subscribe(debounce(1000, listener)) } -export function retrievePersistedCompanySituation(): Situation | undefined { +export function retrievePersistedCompanySituation() { const serializedState = safeLocalStorage.getItem(LOCAL_STORAGE_KEY) return serializedState && serializedState !== 'undefined'