We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2ceaaa commit 59d16d0Copy full SHA for 59d16d0
src/attack_flow_builder/src/assets/scripts/Application/Commands/FileManagement/SaveDiagramFileToDevice.ts
@@ -20,7 +20,10 @@ export class SaveDiagramFileToDevice extends GroupCommand {
20
// Serialize file
21
const json = JSON.stringify(file, null, 4);
22
// Save file
23
- this.add(new SaveFileToDevice(editor.name, Configuration.file_type_extension, json));
+ const nameProperty = editor.file?.canvas.properties.value.get("name");
24
+ const fileName = nameProperty ? nameProperty.toString() : "Untitled Document";
25
+ // ?? "Untitled Document";
26
+ this.add(new SaveFileToDevice(fileName, Configuration.file_type_extension, json));
27
this.add(new RemoveFileFromRecoveryBank(context, editor.id));
28
}
29
0 commit comments