Fix tests but break demo 27
This commit is contained in:
@ -137,7 +137,7 @@ describe("External styles factory", () => {
|
||||
// tslint:disable-next-line:no-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({
|
||||
_attr: {
|
||||
"w:default": "1",
|
||||
|
@ -7,8 +7,6 @@ export const parseOptions = {
|
||||
ignoreAttributes: false,
|
||||
attributeNamePrefix: "",
|
||||
attrNodeName: "_attr",
|
||||
textNodeName: "",
|
||||
trimValues: false,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -24,7 +24,7 @@ export abstract class XmlComponent extends BaseXmlComponent {
|
||||
}
|
||||
return comp;
|
||||
})
|
||||
.filter((comp) => comp !== null); // Exclude null, undefined, and empty strings
|
||||
.filter((comp) => comp); // Exclude null, undefined, and empty strings
|
||||
return {
|
||||
[this.rootKey]: children,
|
||||
};
|
||||
|
Reference in New Issue
Block a user