diff --git a/src/common/ResponsiveTable.tsx b/src/common/ResponsiveTable.tsx index d2f10d2..cf61442 100644 --- a/src/common/ResponsiveTable.tsx +++ b/src/common/ResponsiveTable.tsx @@ -349,7 +349,7 @@ export default function ResponsiveTable(props: Props) { ) })} - {rows.length < 1 && + {(rows && rows.length < 1) && (!isLoading ? { noDataMessage ? noDataMessage : "No data."} @@ -432,7 +432,7 @@ export default function ResponsiveTable(props: Props) { ) }) - : rows.length > 0 && + : (rows && rows.length > 0) && Object.keys(rows[0]).map((value, index) => { return( @@ -518,7 +518,7 @@ export default function ResponsiveTable(props: Props) { ) }) } - {rows.length < 1 && !isLoading && + {(rows && rows.length)< 1 && !isLoading &&