From e7fd303f4d26d72603b6db585f13546a3351e068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20R=C3=A1ez=20Rodr=C3=ADguez?= Date: Thu, 6 Apr 2023 00:24:21 +0200 Subject: [PATCH] feat(#125): Removed array creation: map handles it --- .../hawtio/src/plugins/shared/attributes/AttributeTable.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/hawtio/src/plugins/shared/attributes/AttributeTable.tsx b/packages/hawtio/src/plugins/shared/attributes/AttributeTable.tsx index 4ed6abc6..da73f51d 100644 --- a/packages/hawtio/src/plugins/shared/attributes/AttributeTable.tsx +++ b/packages/hawtio/src/plugins/shared/attributes/AttributeTable.tsx @@ -75,9 +75,7 @@ export const AttributeTable: React.FunctionComponent = () => { const labels = Object.keys(attributes[0]) const columns: TableProps['cells'] = labels.map(label => humanizeLabels(label)) - const rows: TableProps['rows'] = attributes.map(attribute => - [...labels].map(label => JSON.stringify(attribute[label])), - ) + const rows: TableProps['rows'] = attributes.map(attribute => labels.map(label => JSON.stringify(attribute[label]))) return (