Fix tests and use proper types for disregarding XMLComponent
This commit is contained in:
@ -126,9 +126,13 @@ export class TableCell extends XmlComponent {
|
||||
return this;
|
||||
}
|
||||
|
||||
public prepForXml(): IXmlableObject {
|
||||
public prepForXml(): IXmlableObject | undefined {
|
||||
// Cells must end with a paragraph
|
||||
const retval = super.prepForXml();
|
||||
if (!retval) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const content = retval["w:tc"];
|
||||
if (!content[content.length - 1]["w:p"]) {
|
||||
content.push(new Paragraph().prepForXml());
|
||||
|
Reference in New Issue
Block a user