Skip to content

Commit 6304381

Browse files
committed
Fix: doneCommand was not called after submit completion
1 parent 66649ee commit 6304381

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

svelte/Main.svelte

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@
3333
return () => clearInterval(interval);
3434
});
3535
36+
let submitted = false; // the form is submitted into the command log frame at least once. this prevents doneCommand to be called on page load.
37+
3638
function submitCommandForm() {
39+
submitted = true;
40+
3741
commandLog.classList.remove('hidden');
3842
3943
// set border to red
@@ -43,7 +47,7 @@
4347
}
4448
4549
function doneCommand() {
46-
if (commandLogFrame.getAttribute('src') == 'about:blank') {
50+
if (!submitted) {
4751
return;
4852
}
4953

0 commit comments

Comments
 (0)