Skip to content

Commit f99addd

Browse files
authored
fix: Cannot destructure property row of i as it is null. (marktext#1900)
1 parent 609e435 commit f99addd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/muya/lib/contentState/tableSelectCellsCtrl.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ const tableSelectCellsCtrl = ContentState => {
178178
const isWholeTableSelected = rows.size === +row + 1 && cells.length === (+row + 1) * (+column + 1)
179179

180180
if (isCut && isWholeTableSelected) {
181+
this.selectedTableCells = null
181182
return this.deleteParagraph(tableId)
182183
}
183184

@@ -189,6 +190,7 @@ const tableSelectCellsCtrl = ContentState => {
189190
const cellKey = cells[0].key
190191
const cellBlock = this.getBlock(cellKey)
191192
const cellContentKey = cellBlock.children[0].key
193+
this.selectedTableCells = null
192194
if (isOneColumnSelected) {
193195
// Remove one empty column
194196
return this.editTable({

0 commit comments

Comments
 (0)