Fix leaked global variable.

This commit is contained in:
Jürg Lehni 2016-04-04 23:38:37 -07:00
parent ae9ff56260
commit 093227be7e

View file

@ -369,9 +369,9 @@ var Raster = Item.extend(/** @lends Raster# */{
},
setSource: function(src) {
image = new window.Image();
var image = new window.Image(),
crossOrigin = this._crossOrigin;
image.src = paper.resolvePath(src);
var crossOrigin = this._crossOrigin;
if (crossOrigin)
image.crossOrigin = crossOrigin;
this.setImage(image);