diff --git a/lib/Viewer.js b/lib/Viewer.js index 71d207d6..7d275bc8 100644 --- a/lib/Viewer.js +++ b/lib/Viewer.js @@ -233,7 +233,7 @@ Viewer.prototype.saveSVG = function(options, done) { defsNode = domQuery('defs', canvas._svg); var contents = innerSVG(contentNode), - defs = (defsNode && defsNode.outerHTML) || ''; + defs = defsNode ? '' + innerSVG(defsNode) + '' : ''; var bbox = contentNode.getBBox();