Skip to content

Commit 904a13a

Browse files
committed
only try to run code if code has been found
1 parent 99a6ba8 commit 904a13a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

frontend/src/App.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,12 @@ function App() {
134134
return;
135135
}
136136

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

0 commit comments

Comments
 (0)