We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd184a5 commit 4826325Copy full SHA for 4826325
javascript/src/ycell.ts
@@ -793,12 +793,13 @@ export class YCodeCell
793
const { text, ...outputWithoutText } = output;
794
_newOutput1 = outputWithoutText;
795
const newText = new Y.Text();
796
- let length = 0;
797
- // text is a list of strings
798
- for (const str of text as string[]) {
799
- newText.insert(length, str);
800
- length += str.length;
+ let _text: string;
+ if (text instanceof Array) {
+ _text = text.join();
+ } else {
+ _text = text as string;
801
}
802
+ newText.insert(0, _text);
803
_newOutput1['text'] = newText;
804
} else {
805
_newOutput1 = output;
0 commit comments