diff --git a/IPython/html/static/notebook/js/outputarea.js b/IPython/html/static/notebook/js/outputarea.js index 91886df25..6b47cf090 100644 --- a/IPython/html/static/notebook/js/outputarea.js +++ b/IPython/html/static/notebook/js/outputarea.js @@ -290,7 +290,6 @@ var IPython = (function (IPython) { OutputArea.prototype.append_output = function (json, dynamic) { // If dynamic is true, javascript output will be eval'd. this.expand(); - // Clear the output if clear is queued. var needs_height_reset = false; if (this.clear_queued) { @@ -425,11 +424,12 @@ var IPython = (function (IPython) { OutputArea.prototype.append_display_data = function (json, dynamic) { var toinsert = this.create_output_area(); - this.append_mime_type(json, toinsert, dynamic); - this._safe_append(toinsert); - // If we just output latex, typeset it. - if ( (json.latex !== undefined) || (json.html !== undefined) ) { - this.typeset(); + if (this.append_mime_type(json, toinsert, dynamic)) { + this._safe_append(toinsert); + // If we just output latex, typeset it. + if ( (json.latex !== undefined) || (json.html !== undefined) ) { + this.typeset(); + } } }; @@ -446,13 +446,16 @@ var IPython = (function (IPython) { if(type == 'javascript'){ if (dynamic) { this.append_javascript(json.javascript, md, element, dynamic); + return true; } } else { this['append_'+type](json[type], md, element); + return true; } - return; + return false; } } + return false; };