Fondation
This commit is contained in:
parent
29db360f80
commit
250421c1c0
@ -207,8 +207,9 @@ export class NotificationRegistry {
|
||||
let timestamp: Date;
|
||||
if (typeof item.timestamp === 'string') {
|
||||
timestamp = new Date(item.timestamp);
|
||||
} else if (item.timestamp instanceof Date) {
|
||||
timestamp = item.timestamp;
|
||||
} else if (item.timestamp && typeof item.timestamp === 'object' && 'getTime' in item.timestamp) {
|
||||
// Handle Date object (from JSON.parse)
|
||||
timestamp = new Date(item.timestamp as any);
|
||||
} else {
|
||||
timestamp = new Date(); // Fallback to now
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user