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
|
// 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",
|
||||||
|
@ -7,8 +7,6 @@ export const parseOptions = {
|
|||||||
ignoreAttributes: false,
|
ignoreAttributes: false,
|
||||||
attributeNamePrefix: "",
|
attributeNamePrefix: "",
|
||||||
attrNodeName: "_attr",
|
attrNodeName: "_attr",
|
||||||
textNodeName: "",
|
|
||||||
trimValues: false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user