mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
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:
parent
de36f39cbf
commit
9cafb6d55f
1 changed files with 2 additions and 1 deletions
|
@ -408,7 +408,8 @@ var Raster = Item.extend(/** @lends Raster# */{
|
||||||
crossOrigin = this._crossOrigin;
|
crossOrigin = this._crossOrigin;
|
||||||
if (crossOrigin)
|
if (crossOrigin)
|
||||||
image.crossOrigin = crossOrigin;
|
image.crossOrigin = crossOrigin;
|
||||||
image.src = src;
|
if (src)
|
||||||
|
image.src = src;
|
||||||
this.setImage(image);
|
this.setImage(image);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue