Fix type of delete from situation
parent
1948566a08
commit
4fc2271d24
|
@ -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)
|
||||
|
|
|
@ -142,8 +142,8 @@ function simulation(
|
|||
...state,
|
||||
situation: omit(
|
||||
{ ...state.situation },
|
||||
action.fieldName as keyof Simulation['situation']
|
||||
),
|
||||
action.fieldName
|
||||
) as Simulation['situation'],
|
||||
}
|
||||
|
||||
return newState
|
||||
|
|
Loading…
Reference in New Issue