Skip to content

The Open Source DocuSign Alternative.

chore: update self signer logic

Adithya Krishna98672560ca0d
diff --git a/packages/ui/primitives/document-flow/add-signers.tsx b/packages/ui/primitives/document-flow/add-signers.tsx
index 682a3fe7a..cfee325e1 100644
--- a/packages/ui/primitives/document-flow/add-signers.tsx
+++ b/packages/ui/primitives/document-flow/add-signers.tsx
@@ -169,7 +169,7 @@ export const AddSignersFormPartial = ({
const onAddSelfSigner = () => {
const lastSignerIndex = signers.length - 1;
- if (!signers[lastSignerIndex].name && !signers[lastSignerIndex].email) {
+ if (signers[lastSignerIndex].email || signers[lastSignerIndex].name) {
onRemoveSigner(lastSignerIndex);
}
if (emptySignerIndex !== -1) {
@@ -268,7 +268,7 @@ export const AddSignersFormPartial = ({
disabled={
isSubmitting ||
hasBeenSentToRecipientId(signer.nativeId) ||
- signers[index].email === user?.email
+ signers[index].name === user?.name
}
onKeyDown={onKeyDown}
/>