diff --git a/ts/docx/table/index.ts b/ts/docx/table/index.ts index c407989b5e..c3b403b7bb 100644 --- a/ts/docx/table/index.ts +++ b/ts/docx/table/index.ts @@ -96,7 +96,7 @@ class TableCell extends XmlComponent { public push(content: Paragraph | Table): TableCell { this.root.push(content); - return this + return this; } public prepForXml(): object { @@ -106,7 +106,7 @@ class TableCell extends XmlComponent { if (!content[content.length - 1]["w:p"]) { content.push(new Paragraph().prepForXml()); } - return retval + return retval; } public createParagraph(text?: string): Paragraph { diff --git a/ts/tests/docx/document/documentTest.ts b/ts/tests/docx/document/documentTest.ts index abb6ab568b..9531768e2d 100644 --- a/ts/tests/docx/document/documentTest.ts +++ b/ts/tests/docx/document/documentTest.ts @@ -57,7 +57,7 @@ describe("Document", () => { }); it("should create a table with the correct dimensions", () => { - const table = document.createTable(2, 3); + document.createTable(2, 3); const body = new Formatter().format(document)["w:document"][1]["w:body"]; expect(body).to.be.an("array").which.has.length.at.least(1); expect(body[0]).to.have.property("w:tbl").which.includes({ diff --git a/ts/tests/docx/table/testTable.ts b/ts/tests/docx/table/testTable.ts index 1bb9aaf41e..e6c9b23f0b 100644 --- a/ts/tests/docx/table/testTable.ts +++ b/ts/tests/docx/table/testTable.ts @@ -84,7 +84,7 @@ describe("Table", () => { describe("#setWidth", () => { it("sets the preferred width on the table", () => { - const table = new Table(2, 2).setWidth("pct", 1000) + const table = new Table(2, 2).setWidth("pct", 1000); const tree = new Formatter().format(table); expect(tree).to.have.property("w:tbl").which.is.an("array").with.has.length.at.least(1); expect(tree["w:tbl"][0]).to.deep.equal({