Skip to content

Commit 181972b

Browse files
committed
Fix SVG exporting without file ending in Safari
1 parent cbdf507 commit 181972b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/App.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,9 @@ export default {
375375
const url = window.URL.createObjectURL(blob);
376376
const a = document.createElement("a");
377377
a.href = url;
378-
a.download = truncate(
379-
this.text.replace(/[^a-z0-9]/gi, "_").toLowerCase(),
380-
100
381-
); // download file name
378+
a.download =
379+
truncate(this.text.replace(/[^a-z0-9]/gi, "_").toLowerCase(), 100) +
380+
".svg"; // download file name
382381
a.click();
383382
window.URL.revokeObjectURL(url);
384383
},

0 commit comments

Comments
 (0)