From 118fef1277dc876247d9cc62f9a6a2512ebecd3e Mon Sep 17 00:00:00 2001 From: "S. Amir Mohammad Najafi" Date: Mon, 10 Apr 2023 14:18:36 +0330 Subject: [PATCH] fix(com-pwa): handle null created --- uniquely/com-pwa/src/ui/stuff/order-status-box.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uniquely/com-pwa/src/ui/stuff/order-status-box.ts b/uniquely/com-pwa/src/ui/stuff/order-status-box.ts index 0bfd5dd05..1bd0cb879 100644 --- a/uniquely/com-pwa/src/ui/stuff/order-status-box.ts +++ b/uniquely/com-pwa/src/ui/stuff/order-status-box.ts @@ -84,12 +84,12 @@ export class AlwatrOrderStatusBox extends LocalizeMixin(SignalMixin(AlwatrBaseEl elevated: 1, }; - const createdAt = date(new Date(content?.meta?.created ?? 0)); + const createdAt = content?.meta?.created ? date(new Date(content.meta.created)) : null; return html` ${message('order_status_box_status') + ': ' + message('order_status_' + content?.status)}
- ${message('order_status_box_created') + ': ' + createdAt} + ${message('order_status_box_created') + ': ' + (createdAt ?? '')}
`; }