web/storagenode: notification createdAt bug fixed
Change-Id: If989f3db1dfa947cd598b9aad906df074761b954
This commit is contained in:
parent
49884b5aad
commit
4661bc9b84
@ -29,7 +29,7 @@ export class UINotification {
|
||||
public title: string;
|
||||
public message: string;
|
||||
public readAt: Date | null;
|
||||
public createdAt: Date;
|
||||
public createdAt: Date = new Date();
|
||||
|
||||
public constructor(notification: Partial<UINotification> = new Notification()) {
|
||||
Object.assign(this, notification);
|
||||
@ -53,7 +53,7 @@ export class UINotification {
|
||||
case differenceInSeconds < 86400 * 2:
|
||||
return `Yesterday`;
|
||||
default:
|
||||
return this.createdAt.toDateString();
|
||||
return new Date(this.createdAt).toDateString();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user