Fix tests and use proper types for disregarding XMLComponent

This commit is contained in:
Dolan
2018-09-20 00:41:57 +01:00
parent fc71ebdfef
commit f2b50478bf
14 changed files with 68 additions and 44 deletions

View File

@ -21,8 +21,10 @@ export class TableCellMargin extends XmlComponent {
super("w:tblCellMar");
}
public prepForXml(): IXmlableObject {
return this.root.length > 0 ? super.prepForXml() : "";
public prepForXml(): IXmlableObject | undefined {
if (this.root.length > 0) {
return super.prepForXml();
}
}
public addTopMargin(value: number, type: WidthType = WidthType.DXA): void {