Make sure extension gets set correctly for exports (#1962)

This commit is contained in:
Thomas Steiner 2020-07-25 13:00:55 +02:00 committed by GitHub
parent dc1f6c4d4c
commit d3a38202e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -314,6 +314,7 @@ export const exportCanvas = async (
if (type === "svg") {
await fileSave(new Blob([tempSvg.outerHTML], { type: "image/svg+xml" }), {
fileName: `${name}.svg`,
extensions: ["svg"],
});
return;
} else if (type === "clipboard-svg") {
@ -338,6 +339,7 @@ export const exportCanvas = async (
if (blob) {
await fileSave(blob, {
fileName: fileName,
extensions: ["png"],
});
}
});