web/storagenode: notification createdAt bug fixed

Change-Id: If989f3db1dfa947cd598b9aad906df074761b954
This commit is contained in:
NickolaiYurchenko 2021-02-03 15:43:41 +02:00 committed by Nikolay Yurchenko
parent 49884b5aad
commit 4661bc9b84

View File

@ -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();
}
}