Skip to content

Commit

Permalink
Use optional chain expression
Browse files Browse the repository at this point in the history
Addresses RISDEV-0000
  • Loading branch information
zechmeister committed Sep 20, 2023
1 parent 440ed9d commit 90d322b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions frontend/src/components/procedures/ProcedureList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ function copyDocumentUnits(
const oldProcedure = oldProcedures?.find(
(oldProcedure) => oldProcedure.label == newProcedure.label,
)
return oldProcedure && oldProcedure.documentUnits
? oldProcedure
: newProcedure
return oldProcedure?.documentUnits ? oldProcedure : newProcedure
})
}
Expand Down

0 comments on commit 90d322b

Please sign in to comment.