Skip to content

Commit 6ccea52

Browse files
authored
Merge pull request #3 from dasmy/dev/do_not_execute_without_code
only try to run code if code has been found
2 parents 5154ac9 + 904a13a commit 6ccea52

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

frontend/src/App.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,12 @@ function App() {
133133
return;
134134
}
135135

136-
submitCode(code);
137-
setWaitingForSystem(WaitingStates.RunningCode);
136+
if (!!code) {
137+
submitCode(code);
138+
setWaitingForSystem(WaitingStates.RunningCode);
139+
} else {
140+
setWaitingForSystem(WaitingStates.Idle);
141+
}
138142
} catch (error) {
139143
console.error(
140144
"There has been a problem with your fetch operation:",

0 commit comments

Comments
 (0)