Skip to content

Commit

Permalink
Remove unnecessary codes
Browse files Browse the repository at this point in the history
  • Loading branch information
hannyle committed Sep 23, 2021
1 parent e723b56 commit ce9c62c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/features/wizardSubmissionFolderSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ export const replaceObjectInFolder =
): ((dispatch: (any) => void) => Promise<any>) =>
async (dispatch: any => void) => {
const changes =
objectStatus?.toLowerCase() === ObjectStatus.submitted.toLowerCase()
objectStatus === ObjectStatus.submitted
? [{ op: "replace", path: `/metadataObjects/${index}/tags`, value: tags }]
: [{ op: "replace", path: `/drafts/${index}/tags`, value: tags }]

const response = await folderAPIService.patchFolderById(folderID, changes)
return new Promise((resolve, reject) => {
if (response.ok) {
objectStatus?.toLowerCase() === ObjectStatus.submitted.toLowerCase()
objectStatus === ObjectStatus.submitted
? dispatch(modifyObjectTags({ accessionId: accessionId, tags: tags }))
: dispatch(
modifyDraftObjectTags({
Expand Down

0 comments on commit ce9c62c

Please sign in to comment.