Skip to content

Commit

Permalink
Fix check if requested_by exists
Browse files Browse the repository at this point in the history
When we request to sign a file, this property does not exists. This
property only exists after request to sign

Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos committed Feb 29, 2024
1 parent 9f81702 commit a7079b7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Components/Request/RequestSignature.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ export default {
computed: {
canSave() {
return this.canRequestSign
&& this.filesStore.getFile().requested_by.uid === getCurrentUser().uid
&& (
!Object.hasOwn(this.filesStore.getFile(), 'requested_by')
|| this.filesStore.getFile().requested_by.uid === getCurrentUser().uid
)
&& !this.filesStore.isSigned()
&& this.filesStore.getFile()?.signers?.length > 0
},
Expand Down

0 comments on commit a7079b7

Please sign in to comment.