Description:
fixed new submission error showing nil compiler message
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r772:72eb3ebb9aef - - 1 file changed: 3 inserted, 1 deleted
@@ -50,25 +50,27 | |||
|
50 | 50 | .col-md-12 |
|
51 | 51 | %h2 Console |
|
52 | 52 | %textarea#console{style: 'height: 100%; width: 100%;background-color:#000;color:#fff;font-family: consolas, monaco, "Droid Sans Mono";',rows: 20} |
|
53 | 53 | |
|
54 | 54 | .modal.fade#compiler{tabindex: -1,role: 'dialog'} |
|
55 | 55 | .modal-dialog.modal-lg{role:'document'} |
|
56 | 56 | .modal-content |
|
57 | 57 | .modal-header |
|
58 | 58 | %button.close{type: 'button', data: {dismissed: :modal}, aria: {label: 'close'}} |
|
59 | 59 | %span{aria: {hidden: 'true'}, data: {dismiss: 'modal'}} × |
|
60 | 60 | %h4 Compiler message |
|
61 | 61 | .modal-body |
|
62 | - %pre#compiler_msg= @submission.compiler_message | |
|
62 | + %pre#compiler_msg | |
|
63 | + - if @submission | |
|
64 | + = @submission.compiler_message | |
|
63 | 65 | .modal-footer |
|
64 | 66 | %button.btn.btn-default{type: 'button', data: {dismiss: 'modal'}} Close |
|
65 | 67 | |
|
66 | 68 | :javascript |
|
67 | 69 | $(document).ready(function() { |
|
68 | 70 | e = ace.edit("editor") |
|
69 | 71 | e.setValue($("#text_sourcecode").val()); |
|
70 | 72 | e.gotoLine(1); |
|
71 | 73 | $("#language_id").trigger('change'); |
|
72 | 74 | |
|
73 | 75 | $("#load_file").on('change',function(evt) { |
|
74 | 76 | var file = evt.target.files[0]; |
You need to be logged in to leave comments.
Login now