update signatureCount to init in constructor

This commit is contained in:
2025-09-19 15:18:50 +02:00
parent 7d4106d0a5
commit 80c6b5bc64
2 changed files with 2 additions and 3 deletions

View File

@@ -5,7 +5,7 @@ class App {
this.pdfKit = null
this.currentDocument = envelopeReceiver.envelope.documents[0]
this.currentReceiver = envelopeReceiver.receiver
this.signatureCount = 0;
this.signatureCount = envelopeReceiver.envelope.documents[0].elements.length;
this.envelopeReceiver = envelopeReceiver;
this.documentBytes = documentBytes;
this.licenseKey = licenseKey;
@@ -36,7 +36,6 @@ class App {
// Load annotations into PSPDFKit
try {
this.signatureCount = this.currentDocument.elements.length
await createAnnotations(this.currentDocument, this.pdfKit)
} catch (e) {
console.error("Error loading annotations:", e);