This commit is contained in:
Henning Dieterichs
2022-12-01 16:14:17 +01:00
parent 1b6fabfe29
commit 904d0060ea
24 changed files with 1841 additions and 580 deletions

View File

@@ -16,7 +16,9 @@ export class TableDataExtractor implements DataExtractor {
if (!Array.isArray(data)) {
return;
}
if (!data.every(d => typeof d === "object" && d)) {
if (
!data.every((d) => typeof d === "object" && d && !Array.isArray(d))
) {
return;
}
assert<object[]>(data);
@@ -44,7 +46,7 @@ export class TableDataExtractor implements DataExtractor {
kind: {
table: true,
},
rows: data.map(d => ({ type: d.constructor.name, ...d })),
rows: data.map((d) => ({ type: d.constructor.name, ...d })),
});
},
});