Skip to content

Commit

Permalink
fix(com-pwa): handle null created
Browse files Browse the repository at this point in the history
  • Loading branch information
njfamirm authored and alimd committed May 1, 2023
1 parent 8945b97 commit 118fef1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions uniquely/com-pwa/src/ui/stuff/order-status-box.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`
<alwatr-icon-box .content=${iconBoxContent}>
${message('order_status_box_status') + ': ' + message('order_status_' + content?.status)} <br />
${message('order_status_box_created') + ': ' + createdAt}
${message('order_status_box_created') + ': ' + (createdAt ?? '')}
</alwatr-icon-box>
`;
}
Expand Down

0 comments on commit 118fef1

Please sign in to comment.