Commit 697623a2 authored by Romain Casati's avatar Romain Casati
Browse files

Fix error when importing notebook (Stream output is invalid (missing text)).

parent 87238416
Pipeline #413673 passed with stages
in 3 minutes and 54 seconds
......@@ -553,6 +553,7 @@ define([
Cell.prototype.fromJSON.apply(this, arguments);
if (data.cell_type === 'code') {
if (data.source !== undefined) {
// [Basthon]
/* conditional added by Basthon to fix source as array issue */
if( Array.isArray(data.source) ) {
data.source = data.source.join("");
......
......@@ -521,6 +521,9 @@ define([
OutputArea.prototype.append_stream = function (json) {
// [Basthon]
if( Array.isArray(json.text) )
json.text = json.text.join("");
var text = json.text;
if (typeof text !== 'string') {
console.error("Stream output is invalid (missing text)", json);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment