Skip to content

Commit

Permalink
fix: fix error-cannot read property length
Browse files Browse the repository at this point in the history
  • Loading branch information
mccarthyaaron authored and denniskigen committed Oct 14, 2024
1 parent f8937d4 commit b0903f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/esm-patient-common-lib/src/orders/useOrders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function usePatientOrders(patientUuid: string, status?: 'ACTIVE' | 'any',
() =>
data?.data?.results
? data.data.results?.sort((order1, order2) => (order2.dateActivated > order1.dateActivated ? 1 : -1))
: null,
: [],
[data],
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ const OrderDetailsTable: React.FC<OrderDetailsProps> = ({ patientUuid, showAddBu
if (orderTypes && orderTypes?.length > 0) {
return (
<>
{!tableRows.length ? (
{!tableRows?.length ? (
// FIXME: The displayText translation is not working as expected
<EmptyState
headerTitle={headerTitle}
Expand Down

0 comments on commit b0903f7

Please sign in to comment.