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