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 b208786Copy full SHA for b208786
javascript/src/ycell.ts
@@ -793,12 +793,8 @@ 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;
801
- }
+ let _text = text instanceof Array ? text.join() : (text as string);
+ newText.insert(0, _text);
802
_newOutput1['text'] = newText;
803
} else {
804
_newOutput1 = output;
0 commit comments