diff --git a/views/problem.ejs b/views/problem.ejs index 2874221..2c60881 100644 --- a/views/problem.ejs +++ b/views/problem.ejs @@ -202,6 +202,7 @@ editor.setShowPrintMargin(false); editor.renderer.updateFontSize(); function submit_code() { + if (!editor.getValue().trim()) return false; $('#submit_code input[name=language]').val($('#languages-menu .item.active').data('value')); $('#submit_code input[name=code]').val(editor.getValue()); return true;