diff --git a/src/commands.js b/src/commands.js index 65167d89..ff7690e1 100644 --- a/src/commands.js +++ b/src/commands.js @@ -183,7 +183,7 @@ export function removeRow(tr, {map, table, tableStart}, row) { let attrs = table.nodeAt(pos).attrs tr.setNodeMarkup(tr.mapping.slice(mapFrom).map(pos + tableStart), null, setAttr(attrs, "rowspan", attrs.rowspan - 1)) col += attrs.colspan - 1 - } else if (row < map.width && pos == map.map[index + map.width]) { + } else if (row < map.height && pos == map.map[index + map.width]) { // Else, if it continues in the row below, it has to be moved down let cell = table.nodeAt(pos) let copy = cell.type.create(setAttr(cell.attrs, "rowspan", cell.attrs.rowspan - 1), cell.content)