added error checking and updated demo

This commit is contained in:
Dolan
2017-03-29 22:57:52 +01:00
parent 15009884e3
commit af48af2854
3 changed files with 13 additions and 3 deletions

View File

@ -7,6 +7,10 @@ export class Drawing extends XmlComponent {
constructor(imageData: IData) {
super("w:drawing");
if (imageData === undefined) {
throw new Error("imageData cannot be undefined");
}
this.root.push(new Inline(imageData.referenceId));
}
}