fix bug in method Image.setSrc() (#5502)

This commit is contained in:
QZQ 2019-02-17 07:40:10 +08:00 committed by Andrea Bogazzi
parent 850c617bd9
commit d6649b2efb

View file

@ -383,7 +383,7 @@
fabric.util.loadImage(src, function(img) {
this.setElement(img, options);
this._setWidthHeight();
callback(this);
callback && callback(this);
}, this, options && options.crossOrigin);
return this;
},