Fix tests but break demo 27

This commit is contained in:
Dolan
2018-09-17 22:06:38 +01:00
parent d63e6bf6b1
commit 2e00634bc4
3 changed files with 2 additions and 4 deletions

View File

@ -137,7 +137,7 @@ describe("External styles factory", () => {
// tslint:disable-next-line:no-any // tslint:disable-next-line:no-any
const importedStyle = new ExternalStylesFactory().newInstance(externalStyles) as any; const importedStyle = new ExternalStylesFactory().newInstance(externalStyles) as any;
expect(importedStyle.root.length).to.equal(6); expect(importedStyle.root.length).to.equal(5);
expect(importedStyle.root[3]).to.eql({ expect(importedStyle.root[3]).to.eql({
_attr: { _attr: {
"w:default": "1", "w:default": "1",

View File

@ -7,8 +7,6 @@ export const parseOptions = {
ignoreAttributes: false, ignoreAttributes: false,
attributeNamePrefix: "", attributeNamePrefix: "",
attrNodeName: "_attr", attrNodeName: "_attr",
textNodeName: "",
trimValues: false,
}; };
/** /**

View File

@ -24,7 +24,7 @@ export abstract class XmlComponent extends BaseXmlComponent {
} }
return comp; return comp;
}) })
.filter((comp) => comp !== null); // Exclude null, undefined, and empty strings .filter((comp) => comp); // Exclude null, undefined, and empty strings
return { return {
[this.rootKey]: children, [this.rootKey]: children,
}; };