mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
bugfix don't show half created recipient
This commit is contained in:
@ -17,7 +17,9 @@ export default function PDFEditor(props: any) {
|
||||
const [fields, setFields] = useState<any[]>(props.document.Field);
|
||||
const [selectedRecipient, setSelectedRecipient]: any = useState();
|
||||
const [selectedFieldType, setSelectedFieldType] = useState();
|
||||
const noRecipients = props?.document.Recipient.length === 0;
|
||||
const noRecipients =
|
||||
props?.document.Recipient.length === 0 ||
|
||||
props?.document.Recipient.every((e: any) => !e.email);
|
||||
const [adding, setAdding] = useState(false);
|
||||
|
||||
function onPositionChangedHandler(position: any, id: any) {
|
||||
@ -84,6 +86,7 @@ export default function PDFEditor(props: any) {
|
||||
selectedRecipient={selectedRecipient}
|
||||
onChange={setSelectedFieldType}
|
||||
/>
|
||||
{fields.length}
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user