diff --git a/ts/docx/xml-components/default-attributes.ts b/ts/docx/xml-components/default-attributes.ts index e1c4d0e461..7559f9fead 100644 --- a/ts/docx/xml-components/default-attributes.ts +++ b/ts/docx/xml-components/default-attributes.ts @@ -16,7 +16,7 @@ export abstract class XmlAttributeComponent extends BaseXmlComponent { } } - public prepForXml(): object { + public prepForXml(): {_attr: {[key: string]: (string | number | boolean)}} { const attrs = {}; if (this.root !== undefined) { _.forOwn(this.root, (value, key) => { @@ -26,6 +26,6 @@ export abstract class XmlAttributeComponent extends BaseXmlComponent { } }); } - return {[this.rootKey]: attrs}; + return {_attr: attrs}; } }