From 33a413e87745c877c61ba1cbfdc1f83b6bb0c9b2 Mon Sep 17 00:00:00 2001 From: Emmanuel Hadoux Date: Wed, 10 Jan 2024 17:17:49 +0000 Subject: [PATCH] fix: ignore missing ids --- src/Table/Table.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Table/Table.ts b/src/Table/Table.ts index 0c099e8..f4d83b8 100644 --- a/src/Table/Table.ts +++ b/src/Table/Table.ts @@ -23,6 +23,9 @@ export class Table { for (const rs of block.Relationships) { if (rs.Type === 'CHILD') { for (const id of rs.Ids) { + if (blockMap.get(id)?.BlockType !== 'CELL') { + continue; + } const cell = new Cell(blockMap.get(id) as CellBlock, blockMap); if (cell.rowIndex > ri) { this.rows.push(row);