Skip to content

Commit

Permalink
Change initialization logic
Browse files Browse the repository at this point in the history
  • Loading branch information
amanharwara committed Jan 16, 2025
1 parent 764101b commit 5c5132b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/lexical-table/src/LexicalTableUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -856,9 +856,7 @@ export function $computeTableMapSkipCellCheck(
$isTableRowNode(row),
'Expected TableNode children to be TableRowNode',
);
if (row.getChildrenSize() === 0) {
tableMap[rowIdx] = [];
}
const startMapRow = getMapRow(rowIdx);
for (
let cell = row.getFirstChild(), colIdx = 0;
cell != null;
Expand All @@ -869,7 +867,6 @@ export function $computeTableMapSkipCellCheck(
'Expected TableRowNode children to be TableCellNode',
);
// Skip past any columns that were merged from a higher row
const startMapRow = getMapRow(rowIdx);
while (startMapRow[colIdx] !== undefined) {
colIdx++;
}
Expand Down

0 comments on commit 5c5132b

Please sign in to comment.