diff --git a/components/Editor.js b/components/Editor.js index 630627f..79a47aa 100644 --- a/components/Editor.js +++ b/components/Editor.js @@ -119,7 +119,7 @@ class Editor extends React.Component { if (format === 'svg') { return domtoimage .toSvg(node, config) - .then(dataUrl => dataUrl.split(' ').join(' ')) + .then(dataUrl => dataUrl.replace(/ /g, ' ')) .then(uri => uri.slice(uri.indexOf(',') + 1)) .then(data => new Blob([data], { type: 'image/svg+xml' })) .then(data => window.URL.createObjectURL(data))