From 86eff626ce128c8e877a79858724b27852a28c09 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Sun, 5 Jan 2020 17:52:56 +0800 Subject: [PATCH] - Fix (recent regression): check for `source` properly --- editor/svg-editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/svg-editor.js b/editor/svg-editor.js index 8de1b707..c30c6aec 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -773,7 +773,7 @@ editor.init = function () { if (!source) { // urldata.source may have been null if it ended with '=' const {searchParams} = new URL(location); const src = searchParams.get('source'); - if (src.startsWith('data:')) { + if (src && src.startsWith('data:')) { source = src; } }