Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions javascript/src/ycell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -793,12 +793,8 @@ export class YCodeCell
const { text, ...outputWithoutText } = output;
_newOutput1 = outputWithoutText;
const newText = new Y.Text();
let length = 0;
// text is a list of strings
for (const str of text as string[]) {
newText.insert(length, str);
length += str.length;
}
let _text = text instanceof Array ? text.join() : (text as string);
newText.insert(0, _text);
_newOutput1['text'] = newText;
} else {
_newOutput1 = output;
Expand Down
Loading