mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-28 17:02:24 -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;
|
||||
if (crossOrigin)
|
||||
image.crossOrigin = crossOrigin;
|
||||
image.src = src;
|
||||
if (src)
|
||||
image.src = src;
|
||||
this.setImage(image);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue