added conditional statement to add text run
This commit is contained in:
@ -24,7 +24,9 @@ export class Paragraph extends XmlComponent {
|
|||||||
super("w:p");
|
super("w:p");
|
||||||
this.properties = new ParagraphProperties();
|
this.properties = new ParagraphProperties();
|
||||||
this.root.push(this.properties);
|
this.root.push(this.properties);
|
||||||
this.root.push(new TextRun(text));
|
if (text !== undefined) {
|
||||||
|
this.root.push(new TextRun(text));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
addText(run: TextRun): Paragraph {
|
addText(run: TextRun): Paragraph {
|
||||||
|
Reference in New Issue
Block a user