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();