Skip to content

Commit c4acf59

Browse files
committed
don't try to visualize empty code input
1 parent 0392a68 commit c4acf59

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎v3/js/opt-frontend.js‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,12 @@ $(document).ready(function() {
215215
}
216216

217217
function executeCodeFromScratch() {
218+
// don't execute empty string:
219+
if ($.trim(pyInputCodeMirror.getValue()) == '') {
220+
alert('Type in some code to visualize.');
221+
return;
222+
}
223+
218224
// reset these globals
219225
rawInputLst = [];
220226
executeCode();

0 commit comments

Comments
 (0)