Fix type of delete from situation

pull/2092/head
Jérémy Rialland 2022-04-07 18:53:43 +02:00 committed by Johan Girod
parent 1948566a08
commit 4fc2271d24
2 changed files with 3 additions and 5 deletions

View File

@ -40,9 +40,7 @@ export function companySituation(state: Situation = {}, action: Action) {
}
break
case 'DELETE_FROM_SITUATION': {
const newState = omit({ ...state }, action.fieldName)
return newState
return omit({ ...state }, action.fieldName) as Situation
}
case 'COMPANY::SET_EXISTING_COMPANY':
return getCompanySituation(action.entreprise)

View File

@ -142,8 +142,8 @@ function simulation(
...state,
situation: omit(
{ ...state.situation },
action.fieldName as keyof Simulation['situation']
),
action.fieldName
) as Simulation['situation'],
}
return newState