Improve tests

This commit is contained in:
Dolan
2021-03-13 19:53:36 +00:00
parent 8aa804db18
commit cc9a966f53
3 changed files with 22 additions and 10 deletions

View File

@ -72,18 +72,18 @@ export class PageBorders extends IgnoreIfEmptyXmlComponent {
return;
}
let pageBordersAttributes = {};
if (options.pageBorders) {
pageBordersAttributes = {
display: options.pageBorders.display,
offsetFrom: options.pageBorders.offsetFrom,
zOrder: options.pageBorders.zOrder,
};
this.root.push(
new PageBordersAttributes({
display: options.pageBorders.display,
offsetFrom: options.pageBorders.offsetFrom,
zOrder: options.pageBorders.zOrder,
}),
);
} else {
this.root.push(new PageBordersAttributes({}));
}
this.root.push(new PageBordersAttributes(pageBordersAttributes));
if (options.pageBorderTop) {
this.root.push(new PageBorder("w:top", options.pageBorderTop));
}