diff --git a/package.json b/package.json index 104e4242..ea8368b2 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "node": ">=0.10.0 <6.0.0" }, "dependencies": { - "jsdom": "git://github.com/lehni/jsdom.git#3d55789d0f4d55392721b1e22890837fde472375", + "jsdom": "git://github.com/lehni/jsdom.git#bd86dd16666241edd5f25bc4f4e144f24da3c889", "source-map-support": "^0.4.0" }, "optionalDependencies": { diff --git a/src/node/window.js b/src/node/window.js index a3e58f9c..be7010fd 100644 --- a/src/node/window.js +++ b/src/node/window.js @@ -32,7 +32,9 @@ function XMLSerializer() { } XMLSerializer.prototype.serializeToString = function(node) { - var text = jsdom.serializeDocument(node); + if (!node) + return ''; + var text = node.outerHTML; // Fix a jsdom issue where all SVG tagNames are lowercased: // https://github.com/tmpvar/jsdom/issues/620 var tagNames = ['linearGradient', 'radialGradient', 'clipPath', 'textPath'];