File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,6 @@ class Typing extends Component {
5252
5353 resetState = async ( ) =>
5454 this . updateState ( {
55- text : [ ] ,
5655 toType : extractText ( this . props . children ) ,
5756 cursor : {
5857 lineNum : 0 ,
@@ -194,12 +193,11 @@ class Typing extends Component {
194193
195194 render ( ) {
196195 const { children, className, cursorClassName, hideCursor } = this . props ;
197- const { isFinished } = this . state ;
196+ const { isFinished, text } = this . state ;
198197
199198 const cursor = this . props . cursor || < Cursor className = { cursorClassName } /> ;
200- const filled = isFinished
201- ? children
202- : replaceTreeText ( children , this . state . text , cursor , hideCursor ) ;
199+
200+ const filled = replaceTreeText ( children , text , cursor , isFinished || hideCursor )
203201
204202 return < div className = { className } > { filled } </ div > ;
205203 }
You can’t perform that action at this time.
0 commit comments