await refetchDocument();
if (fetchDocumentError) throw fetchDocumentError;
console.log("existingDocument");
if (existingDocument?.checksum === checksum) return;
if (existingDocument !== undefined || existingDocument !== null) {
await deleteSections({ documentId: existingDocument!.id });
if (deleteSectionsError) throw deleteSectionsError;
}
await refetchDocument();
if (fetchDocumentError) throw fetchDocumentError;
console.log("existingDocument");
if (existingDocument?.checksum === checksum) return;
if (existingDocument !== undefined || existingDocument !== null) {
await deleteSections({ documentId: existingDocument!.id });
if (deleteSectionsError) throw deleteSectionsError;
}