Fondation

This commit is contained in:
alma 2026-01-17 02:44:15 +01:00
parent 29db360f80
commit 250421c1c0

View File

@ -207,8 +207,9 @@ export class NotificationRegistry {
let timestamp: Date; let timestamp: Date;
if (typeof item.timestamp === 'string') { if (typeof item.timestamp === 'string') {
timestamp = new Date(item.timestamp); timestamp = new Date(item.timestamp);
} else if (item.timestamp instanceof Date) { } else if (item.timestamp && typeof item.timestamp === 'object' && 'getTime' in item.timestamp) {
timestamp = item.timestamp; // Handle Date object (from JSON.parse)
timestamp = new Date(item.timestamp as any);
} else { } else {
timestamp = new Date(); // Fallback to now timestamp = new Date(); // Fallback to now
} }