Skip to content

Commit 57769f4

Browse files
committed
record cancel works
1 parent 7cb169b commit 57769f4

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

js/activity.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1282,8 +1282,16 @@ class Activity {
12821282
}
12831283
);
12841284

1285-
const filename = window.prompt("Enter file name"),
1286-
downloadLink = document.createElement("a");
1285+
const filename = window.prompt("Enter file name");
1286+
if (filename === null || filename.trim() === "") {
1287+
alert("File save canceled.");
1288+
flag = 0;
1289+
recording();
1290+
doRecordButton();
1291+
return; // Exit without saving the file
1292+
}
1293+
1294+
const downloadLink = document.createElement("a");
12871295
downloadLink.href = URL.createObjectURL(blob);
12881296
downloadLink.download = `${filename}.webm`;
12891297

0 commit comments

Comments
 (0)