Remove unessesary null check
Trust the compiler and code
This commit is contained in:
@ -23,10 +23,6 @@ export class Drawing extends XmlComponent {
|
|||||||
constructor(imageData: IMediaData, drawingOptions: IDrawingOptions = {}) {
|
constructor(imageData: IMediaData, drawingOptions: IDrawingOptions = {}) {
|
||||||
super("w:drawing");
|
super("w:drawing");
|
||||||
|
|
||||||
if (imageData === undefined) {
|
|
||||||
throw new Error("imageData cannot be undefined");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!drawingOptions.floating) {
|
if (!drawingOptions.floating) {
|
||||||
this.inline = new Inline(imageData, imageData.dimensions);
|
this.inline = new Inline(imageData, imageData.dimensions);
|
||||||
this.root.push(this.inline);
|
this.root.push(this.inline);
|
||||||
|
Reference in New Issue
Block a user