Only set src attribute if it’s not empty

window.Image does not support clearing the attribute by setting it to null
This commit is contained in:
Jürg Lehni 2019-06-05 17:35:21 +02:00
parent de36f39cbf
commit 9cafb6d55f

View file

@ -408,7 +408,8 @@ var Raster = Item.extend(/** @lends Raster# */{
crossOrigin = this._crossOrigin;
if (crossOrigin)
image.crossOrigin = crossOrigin;
image.src = src;
if (src)
image.src = src;
this.setImage(image);
},