fix: Fix TypeScript error in PDF generation service cache cleanup
This commit is contained in:
@@ -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() });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user