File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
plugins/plugin-codeflare/src/components Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -36,11 +36,6 @@ export default class XTerm extends React.PureComponent<Props> {
3636 public componentDidMount ( ) {
3737 this . mountTerminal ( )
3838
39- if ( this . props . initialContent ) {
40- // @starpit i don't know why we have to split the newlines...
41- this . props . initialContent . split ( / \n / ) . forEach ( this . writeln )
42- //this.terminal.write(this.props.initialContent)
43- }
4439 if ( this . props . on ) {
4540 this . props . on ( "line" , this . writeln )
4641 }
@@ -81,6 +76,12 @@ export default class XTerm extends React.PureComponent<Props> {
8176 Events . eventChannelUnsafe . on ( "/theme/change" , inject )
8277 this . cleaners . push ( ( ) => Events . eventChannelUnsafe . on ( "/theme/change" , inject ) )
8378
79+ if ( this . props . initialContent ) {
80+ // @starpit i don't know why we have to split the newlines...
81+ this . props . initialContent . split ( / \n / ) . forEach ( this . writeln )
82+ //this.terminal.write(this.props.initialContent)
83+ }
84+
8485 this . terminal . open ( xtermContainer )
8586
8687 const doResize = ( ) => {
You can’t perform that action at this time.
0 commit comments