diff --git a/src/preloadjs/loaders/SVGLoader.js b/src/preloadjs/loaders/SVGLoader.js index 2d5a5eb..2980b9a 100644 --- a/src/preloadjs/loaders/SVGLoader.js +++ b/src/preloadjs/loaders/SVGLoader.js @@ -93,7 +93,7 @@ this.createjs = this.createjs || {}; var xml = createjs.DataUtils.parseXML(loader.getResult(true), "text/xml"); var tag = loader.getTag(); - if (!this._preferXHR) { + if (!this._preferXHR && document.body.contains(tag)) { document.body.removeChild(tag); } @@ -108,4 +108,4 @@ this.createjs = this.createjs || {}; createjs.SVGLoader = createjs.promote(SVGLoader, "AbstractLoader"); -}()); \ No newline at end of file +}());