Skip to content

Commit 91b938d

Browse files
authored
fix: react minified error 482 on doc pages that have table component (#1215)
1 parent 6b29e45 commit 91b938d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/theme/MDXComponents/Table/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ export default function Table(props: HTMLAttributes<HTMLTableElement>) {
7373
const parsedHeadCells = Children.toArray(headRow.props.children).map((cell) =>
7474
parseHeaderCell(cell)
7575
);
76-
const headCellElements = parsedHeadCells.map(async ({ element }) => element);
76+
const headCellElements = parsedHeadCells.map(({ element }): ReactNode => element);
7777
const rebuiltHeadRow = cloneElement(headRow, {}, headCellElements);
7878
const rebuiltThead = cloneElement(theadNode, {}, rebuiltHeadRow);
79-
const finalChildren = tableNodes.map(async (node, index) =>
80-
index === theadPosition ? rebuiltThead : node
79+
const finalChildren = tableNodes.map(
80+
(node, index): ReactNode => (index === theadPosition ? rebuiltThead : node)
8181
);
8282

8383
const hasWidths = parsedHeadCells.some((cell) => Boolean(cell.width));

0 commit comments

Comments
 (0)