Skip to content

Commit

Permalink
[lexical-table] Bug Fix: Selection in tables with merged cells (#6529)
Browse files Browse the repository at this point in the history
Co-authored-by: Ivaylo Pavlov <[email protected]>
  • Loading branch information
elbotho and ivailop7 authored Aug 21, 2024
1 parent 7cf2e24 commit 0373248
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/lexical-table/src/LexicalTableNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ export class TableNode extends ElementNode {
return null;
}

const cell = row[x];
const index = x < row.length ? x : row.length - 1;

const cell = row[index];

if (cell == null) {
return null;
Expand Down

0 comments on commit 0373248

Please sign in to comment.