From 75b3f0f1b73bf72eaa89151d98cbeadd64bc5a2a Mon Sep 17 00:00:00 2001 From: Xiawei Date: Wed, 10 Mar 2021 16:23:47 +0800 Subject: [PATCH] fix removeRow mistake: (row < map.width) -> (row < map.height) --- src/commands.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)