Check for output prior printing

This commit is contained in:
Sebastian Serth
2020-03-06 15:35:02 +01:00
parent 207cf1084b
commit 2a8aabcf60

View File

@ -41,6 +41,7 @@ $(document).on('turbolinks:load', function() {
}; };
var printOutput = function (output) { var printOutput = function (output) {
if (output) {
var element = $('<p>'); var element = $('<p>');
if (output.stderr) { if (output.stderr) {
element.addClass('text-warning'); element.addClass('text-warning');
@ -53,6 +54,7 @@ $(document).on('turbolinks:load', function() {
element.html($('#output').data('message-no-output')); element.html($('#output').data('message-no-output'));
} }
$('#output').append(element); $('#output').append(element);
}
}; };
var printTimeout = function (output) { var printTimeout = function (output) {
@ -66,4 +68,5 @@ $(document).on('turbolinks:load', function() {
$('#command').focus(); $('#command').focus();
$('#command').on('keypress', handleKeyPress); $('#command').on('keypress', handleKeyPress);
} }
}); })
;