Skip to content

Commit 1b5db43

Browse files
committed
only try to run code if code has been found
1 parent 4834dc8 commit 1b5db43

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)