fix a couple of compiler null warnings
This commit is contained in:
@ -1,8 +1,8 @@
|
|||||||
import { XmlAttributeComponent, XmlComponent } from "../xml-components";
|
import { XmlAttributeComponent, XmlComponent } from "../xml-components";
|
||||||
|
|
||||||
interface IIndentAttributesProperties {
|
interface IIndentAttributesProperties {
|
||||||
left: number;
|
left?: number;
|
||||||
hanging: number;
|
hanging?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
class IndentAttributes extends XmlAttributeComponent<IIndentAttributesProperties> {
|
class IndentAttributes extends XmlAttributeComponent<IIndentAttributesProperties> {
|
||||||
|
@ -20,17 +20,18 @@ export abstract class Packer {
|
|||||||
constructor(document: Document, style?: Styles, properties?: Properties, numbering?: Numbering) {
|
constructor(document: Document, style?: Styles, properties?: Properties, numbering?: Numbering) {
|
||||||
this.formatter = new Formatter();
|
this.formatter = new Formatter();
|
||||||
this.document = document;
|
this.document = document;
|
||||||
this.style = style;
|
|
||||||
this.properties = properties;
|
|
||||||
this.numbering = numbering;
|
|
||||||
this.archive = archiver.create("zip", {});
|
this.archive = archiver.create("zip", {});
|
||||||
|
|
||||||
if (!style) {
|
if (style) {
|
||||||
|
this.style = style;
|
||||||
|
} else {
|
||||||
const stylesFactory = new DefaultStylesFactory();
|
const stylesFactory = new DefaultStylesFactory();
|
||||||
this.style = stylesFactory.newInstance();
|
this.style = stylesFactory.newInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!properties) {
|
if (properties) {
|
||||||
|
this.properties = properties;
|
||||||
|
} else {
|
||||||
this.properties = new Properties({
|
this.properties = new Properties({
|
||||||
creator: "Un-named",
|
creator: "Un-named",
|
||||||
revision: "1",
|
revision: "1",
|
||||||
@ -38,7 +39,9 @@ export abstract class Packer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!numbering) {
|
if (numbering) {
|
||||||
|
this.numbering = numbering;
|
||||||
|
} else {
|
||||||
this.numbering = new Numbering();
|
this.numbering = new Numbering();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user