fix several configuration issue and linter

This commit is contained in:
JFH
2021-05-19 23:09:40 +02:00
parent ab6a2a3ca2
commit e71958e705
27 changed files with 214 additions and 336 deletions

View File

@@ -89,7 +89,7 @@ export default {
svgCanvas.clearSelection();
} catch (e) {
// Todo: Surface error to user
console.log(e);
console.error(e);
return false;
}

View File

@@ -24,7 +24,7 @@ export default {
// to configure
const { allowedOrigins } = svgEditor.configObj.curConfig;
if (!allowedOrigins.includes('*') && !allowedOrigins.includes(e.origin)) {
console.log(`Origin ${e.origin} not whitelisted for posting to ${window.origin}`);
console.warn(`Origin ${e.origin} not whitelisted for posting to ${window.origin}`);
return;
}
const cbid = data.id;
@@ -43,7 +43,7 @@ export default {
e.source.postMessage(JSON.stringify(message), '*');
});
} catch (err) {
console.log('Error with xdomain message listener: ' + err);
console.error('Error with xdomain message listener: ' + err);
}
}
};