added error checking and updated demo
This commit is contained in:
@ -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));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user