:typo: update comments

This commit is contained in:
wangfengming
2020-07-08 11:26:24 +08:00
parent 80bab95f6c
commit 0de302d192
2 changed files with 2 additions and 2 deletions

View File

@ -271,7 +271,7 @@ describe("TableRow", () => {
}); });
expect(tableRow.columnIndexToRootIndex(8, true)).to.equal(5); expect(tableRow.columnIndexToRootIndex(8, true)).to.equal(5);
// for column 10, just place the new cell at the end of cell // for column 10, just place the new cell at the end of row
expect(tableRow.columnIndexToRootIndex(10, true)).to.equal(5); expect(tableRow.columnIndexToRootIndex(10, true)).to.equal(5);
}); });
}); });

View File

@ -86,7 +86,7 @@ export class TableRow extends XmlComponent {
while (colIdx <= columnIndex) { while (colIdx <= columnIndex) {
if (rootIdx >= this.root.length) { if (rootIdx >= this.root.length) {
if (allowEndNewCell) { if (allowEndNewCell) {
// for insert verticalMerge CONTINUE at row end // for inserting verticalMerge CONTINUE cell at end of row
return this.root.length; return this.root.length;
} else { } else {
throw new Error(`cell 'columnIndex' should not great than ${colIdx - 1}`); throw new Error(`cell 'columnIndex' should not great than ${colIdx - 1}`);