mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 06:37:56 +01:00
Catch export errors
This commit is contained in:
parent
7c9effaa5d
commit
bea6a15282
@ -70,7 +70,7 @@ const ExportDialog = ({
|
||||
setSubmit(true);
|
||||
};
|
||||
|
||||
const exporter = (formatType: ExportFormat) => {
|
||||
const exporter = (formatType: ExportFormat): Promise<string> => {
|
||||
let svgElement: Element | null = null;
|
||||
let size;
|
||||
let mindmap: Mindmap;
|
||||
@ -129,7 +129,10 @@ const ExportDialog = ({
|
||||
// Clean up ...
|
||||
URL.revokeObjectURL(url);
|
||||
document.body.removeChild(anchor);
|
||||
}).catch((fail) => {
|
||||
console.log("Unexpected error during export:" + fail);
|
||||
});
|
||||
|
||||
onClose();
|
||||
}
|
||||
}, [submit]);
|
||||
|
Loading…
Reference in New Issue
Block a user