From 181972b3f179cb3f4c7cbf8252a8e44eb511d539 Mon Sep 17 00:00:00 2001 From: Jeremias Volker Date: Sun, 24 Jan 2021 21:42:48 +0100 Subject: [PATCH] Fix SVG exporting without file ending in Safari --- src/App.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/App.vue b/src/App.vue index 4bc1559..4c7c5b8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -375,10 +375,9 @@ export default { const url = window.URL.createObjectURL(blob); const a = document.createElement("a"); a.href = url; - a.download = truncate( - this.text.replace(/[^a-z0-9]/gi, "_").toLowerCase(), - 100 - ); // download file name + a.download = + truncate(this.text.replace(/[^a-z0-9]/gi, "_").toLowerCase(), 100) + + ".svg"; // download file name a.click(); window.URL.revokeObjectURL(url); },