Skip to content

Commit

Permalink
Remove previousPhotoId if present
Browse files Browse the repository at this point in the history
  • Loading branch information
auloin committed Aug 19, 2021
1 parent 8529f21 commit 90ffa83
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/garden.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ export const updateGarden = async ({ photo, ...rest }) => {
return all;
}, {});

if ('previousPhotoId' in rest) delete rest.previousPhotoId;

const garden = {
...rest,
facilities,
Expand Down

0 comments on commit 90ffa83

Please sign in to comment.