#1699 Allow images to work with Hyperlink

Add stack to IContext for prepForXml
This commit is contained in:
Dolan Miu
2022-12-26 15:12:44 +00:00
parent abcfd79f2f
commit fe8b0a6b2b
16 changed files with 506 additions and 26 deletions

View File

@ -34,7 +34,7 @@ export class NextAttributeComponent<T extends AttributeData> extends BaseXmlComp
public prepForXml(_: IContext): IXmlableObject {
const attrs = Object.values<{ readonly key: string; readonly value: string | boolean | number }>(this.root)
.filter(({ value }) => !!value)
.filter(({ value }) => value !== undefined)
.reduce((acc, { key, value }) => ({ ...acc, [key]: value }), {} as IXmlAttribute);
return { _attr: attrs };
}