adobe / aio-theme

The Adobe I/O theme for building markdown powered sites
Apache License 2.0
72 stars 43 forks source link

Table body errors when providing a single element #1518

Closed mbradoschi closed 1 year ago

mbradoschi commented 1 year ago

๐Ÿ› Bug Report

TBody component will throw a TypeError whenever the children provided to it represent a single item array.

E.g.:

<TBody>
  {singleItemArray.map(item => <Tr />)}
</TBody>

๐Ÿค” Expected Behavior

TBody should properly display provided children or be empty when none provided.

๐Ÿ˜ฏ Current Behavior

Component errors with:

Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'tableWidth')

๐Ÿ’ Possible Solution

1517

๐Ÿ”ฆ Context

Breaking change after aio-theme upgrade inside https://github.com/AdobeDocs/cloudmanager-api-docs.

๐Ÿ’ป Code Sample

https://github.com/AdobeDocs/cloudmanager-api-docs/blob/main/src/components/playground/link-table.js#L67

๐ŸŒ Your Environment

Production

๐Ÿงข Your Company/Team

AEM Cloud Manager

๐Ÿ•ท Tracking Issue (optional)

dmitrymatio commented 1 year ago

This was fixed with https://github.com/adobe/aio-theme/pull/1521 sorry for missing tag ๐Ÿ™