Skip to content

Commit 343d060

Browse files
fix: handle empty line for pasting multiple line to table
Signed-off-by: Luka Trovic <[email protected]>
1 parent 49c4b4d commit 343d060

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/nodes/Table/TableCell.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ export default TableCell.extend({
4545
if (i) {
4646
childNodes.push(state.schema.text('\n'))
4747
}
48+
49+
if (!slice.content.child(i).firstChild) {
50+
continue
51+
}
52+
4853
childNodes.push(state.schema.text(slice.content.child(i).textContent, slice.content.child(i).firstChild.marks))
4954
}
5055
const newNode = view.state.schema.node('paragraph', [], childNodes)

0 commit comments

Comments
 (0)