3
0

Use workflow name as title of file if handle isn't provided

This commit is contained in:
Katrin Yordanova
2023-02-09 18:23:24 +02:00
parent 771af663f0
commit 96f8bc55c2
2 changed files with 3 additions and 2 deletions
@@ -68,7 +68,8 @@ export default {
// Save file
const blob = new Blob([JSON.stringify({ workflows }, null, 2)], { type: 'application/json' })
saveAs(blob, `${this.fileName}.json`)
const filename = this.fileName.replace(/[/\\?%*:|"<>]/g, '')
saveAs(blob, `${filename}.json`)
},
},
}
@@ -329,7 +329,7 @@
<export
data-test-id="button-export-workflow"
:workflows="[workflow.workflowID]"
:file-name="workflow.handle"
:file-name="workflow.meta.name || workflow.handle"
class="ml-1"
/>