Fix replacer error on patches with empty Runs (#2875)
* Add test to demonstrate empty strings not creating runs * Fix Run not creating Text child for empty strings * Simplify TextRun constructor Since `Run` already has a option for instantiating a `Text` element, we don't need to push children here. * Add replacer test for empty runs * Add replacer test for empty runs * replacer: handle patches with empty runs * Fix incorrect test name
This commit is contained in:
@ -155,7 +155,7 @@ export class Run extends XmlComponent {
|
||||
|
||||
this.root.push(child);
|
||||
}
|
||||
} else if (options.text) {
|
||||
} else if (options.text !== undefined) {
|
||||
this.root.push(new Text(options.text));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user