Skip to content

Commit

Permalink
[Mission] Undefine values from missionEvent for inactive mission
Browse files Browse the repository at this point in the history
  • Loading branch information
claire2212 committed Jan 20, 2025
1 parent 06ec13b commit bd6aba2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/features/Mission/components/MissionForm/slice.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type ControlUnit } from '@mtes-mct/monitor-ui'
import { undefine, type ControlUnit } from '@mtes-mct/monitor-ui'
import { createSelector, createSlice, type PayloadAction } from '@reduxjs/toolkit'

import type { Infraction, Mission, NewInfraction, NewMission } from '../../../../domain/entities/missions'
Expand Down Expand Up @@ -144,7 +144,7 @@ const missionFormsSlice = createSlice({
missionForm: {
// We keep all data not received from the Mission event (see MISSION_EVENT_UNSYNCHRONIZED_PROPERTIES)
...mission.missionForm,
...action.payload
...undefine(action.payload)
} as Mission
}
}
Expand Down

0 comments on commit bd6aba2

Please sign in to comment.