fix: Fix TypeScript error in PDF generation service cache cleanup

This commit is contained in:
Jon
2025-08-02 09:17:49 -04:00
parent a4f393d4ac
commit 6e164d2bcb

View File

@@ -197,7 +197,9 @@ class PDFGenerationService {
// Limit cache size
if (this.cache.size > 100) {
const oldestKey = this.cache.keys().next().value;
this.cache.delete(oldestKey);
if (oldestKey) {
this.cache.delete(oldestKey);
}
}
this.cache.set(cacheKey, { buffer, timestamp: Date.now() });
}