Skip to content

Commit bbd1579

Browse files
Yuri Pourreyuripourre
authored andcommitted
filenamify file path
1 parent d7b16d5 commit bbd1579

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

editor/src/editor/layout/graph/export.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { writeJSON } from "fs-extra";
55
import { toast } from "sonner";
66

77
import { Editor } from "../../main";
8+
import filenamify from "filenamify/filenamify";
89

910
const JSON_CONFIG = {
1011
spaces: 4,
@@ -50,7 +51,7 @@ export async function exportNode(editor: Editor, node: Node): Promise<void> {
5051
const filePath = saveSingleFileDialog({
5152
title: "Export Node",
5253
filters: [{ name: "Babylon Scene Files", extensions: ["babylon"] }],
53-
defaultPath: `${node.name}.babylon`,
54+
defaultPath: `${filenamify(node.name)}.babylon`,
5455
});
5556

5657
if (!filePath) {

0 commit comments

Comments
 (0)