Skip to content

Commit

Permalink
fix vesselGroups name update
Browse files Browse the repository at this point in the history
  • Loading branch information
j8seangel committed Oct 18, 2024
1 parent 39f897e commit fe63694
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export const updateVesselGroupThunk = createAsyncThunk(
export const updateVesselGroupVesselsThunk = createAsyncThunk(
'vessel-groups/update-vessels',
async (
{ id, vessels = [], override = false }: UpdateVesselGroupThunkParams,
{ id, name, vessels = [], override = false }: UpdateVesselGroupThunkParams,
{ getState, dispatch }
) => {
let vesselGroup = selectVesselGroupById(id)(getState() as any)
Expand All @@ -174,6 +174,7 @@ export const updateVesselGroupVesselsThunk = createAsyncThunk(
return dispatch(
updateVesselGroupThunk({
id: vesselGroup.id,
name: name || vesselGroup.name,
vessels: override
? vessels
: uniqBy([...vesselGroup.vessels, ...vessels], (v) => v.vesselId),
Expand Down

0 comments on commit fe63694

Please sign in to comment.