From 093227be7efadc94dd929e21f075dd512870f15c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Mon, 4 Apr 2016 23:38:37 -0700 Subject: [PATCH] Fix leaked global variable. --- src/item/Raster.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/item/Raster.js b/src/item/Raster.js index aebd4679..c35c6198 100644 --- a/src/item/Raster.js +++ b/src/item/Raster.js @@ -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);