Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}).catch(err => {
const markdown = ParseError((err && err.message) || err)
ModalState.showAlert({
title: 'Error saving project',
description: markdown,
confirmLabel: 'download log',
cancelLabel: 'close',
}).then(choseDownload => {
if (choseDownload) {
browser.downloads.download({
filename: project.name + '-logs.md',
url: createBlob('text/markdown', markdown),
saveAs: true,
conflictAction: 'overwrite',
})
}
})
return Promise.reject()
return Selianize(project, { silenceErrors: true, skipStdLibEmitting: true }).catch(err => {
const markdown = ParseError(err && err.message || err);
ModalState.showAlert({
title: "Error saving project",
description: markdown,
confirmLabel: "Download log",
cancelLabel: "Close"
}, (choseDownload) => {
if (choseDownload) {
browser.downloads.download({
filename: project.name + "-logs.md",
url: createBlob("text/markdown", markdown),
saveAs: true,
conflictAction: "overwrite"
});
}
});
return Promise.reject();