wca-designsystem 1.0.77 → 1.0.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.77",
2
+ "version": "1.0.78",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -12,7 +12,7 @@ export default {
12
12
  const generateData = () => {
13
13
  const data = []
14
14
 
15
- for (let i = 1; i <= 1; i++) {
15
+ for (let i = 1; i <= 3; i++) {
16
16
  const children = [
17
17
  {
18
18
  id: `${i}-1`,
@@ -206,8 +206,8 @@ function BodyTable<
206
206
  );
207
207
  })}
208
208
  </tr>,
209
- ...(expandedRows.has(item.id)
210
- ? item?.children!.flatMap(child =>
209
+ ...(expandedRows.has(item.id) && Array.isArray(item.children)
210
+ ? item.children.flatMap(child =>
211
211
  renderRows(
212
212
  child,
213
213
  columns,
@@ -230,7 +230,7 @@ function BodyTable<
230
230
  color={color}
231
231
  style={{ left: `${hasSelect ? '53px' : '0px'}` }}
232
232
  >
233
- {data.flatMap(item =>
233
+ {data?.flatMap(item =>
234
234
  renderRows(
235
235
  item,
236
236
  columns,