From 7b9c31101e2abf743bc1fe68038cf1f4157e3e15 Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Sun, 24 Jun 2018 17:23:07 -0700 Subject: [PATCH] Fix replace   --- components/Editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))