Fondation
This commit is contained in:
parent
29db360f80
commit
250421c1c0
@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user