- Fix (recent regression): check for source properly

This commit is contained in:
Brett Zamir
2020-01-05 17:52:56 +08:00
parent bf2409fd4c
commit 86eff626ce

View File

@@ -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;
}
}