better error handling and killing logs

This commit is contained in:
Reece
2025-09-26 18:04:01 +01:00
parent d8d6197008
commit 2b6b7a8e1d
3 changed files with 0 additions and 34 deletions

View File

@@ -27,7 +27,6 @@ export const HistoryAPIBridge = forwardRef<HistoryAPI>(function HistoryAPIBridge
if (annotation && annotation.type === 13 && annotation.id && annotation.imageSrc) {
const storedImageData = getImageData(annotation.id);
if (!storedImageData || storedImageData !== annotation.imageSrc) {
console.log('HistoryAPI: Storing image data for annotation', annotation.id);
storeImageData(annotation.id, annotation.imageSrc);
}
}
@@ -43,7 +42,6 @@ export const HistoryAPIBridge = forwardRef<HistoryAPI>(function HistoryAPIBridge
const currentStoredData = getImageData(annotation.id);
// Check if the annotation lacks image data but we have it stored
if (currentStoredData && (!annotation.imageSrc || annotation.imageSrc !== currentStoredData)) {
console.log('HistoryAPI: Restoring image data for annotation', annotation.id);
// Generate new ID to avoid React key conflicts
const newId = uuidV4();

View File

@@ -72,7 +72,6 @@ export const SignatureAPIBridge = forwardRef<SignatureAPI>(function SignatureAPI
if (!annotationApi) return;
// Create image stamp annotation with proper image data
console.log('Creating image annotation with data length:', signatureData?.length);
const annotationId = uuidV4();
@@ -354,7 +353,6 @@ export const SignatureAPIBridge = forwardRef<SignatureAPI>(function SignatureAPI
const pageAnnotationsTask = annotationApi.getPageAnnotations({ pageIndex });
if (pageAnnotationsTask && pageAnnotationsTask.toPromise) {
const annotations = await pageAnnotationsTask.toPromise();
console.log(`Retrieved ${annotations?.length || 0} annotations from page ${pageIndex}`);
return annotations || [];
}
return [];