Skip to content

Commit a98149c

Browse files
.step is now going to be added to the filename if user does not provide it
1 parent e3130c1 commit a98149c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • packages/dev/occt-worker/lib/api/occt

packages/dev/occt-worker/lib/api/occt/io.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ export class OCCTIO {
5858
const blob = new Blob([s], { type: "text/plain" });
5959
const blobUrl = URL.createObjectURL(blob);
6060

61-
const fileName = inputs.fileName ? inputs.fileName : "bitbybit-dev.step";
62-
61+
let fileName = inputs.fileName ? inputs.fileName : "bitbybit-dev.step";
62+
if(!fileName.toLowerCase().includes(".step")) {
63+
fileName += ".step";
64+
}
6365
const fileLink = document.createElement("a");
6466
fileLink.href = blobUrl;
6567
fileLink.target = "_self";

0 commit comments

Comments
 (0)