File tree 1 file changed +3
-3
lines changed
text-io-web/src/main/resources/public-html/textterm
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 88
88
var currentLinePromptElem ;
89
89
var nextTextTermPairIsCurrentLine = true ;
90
90
91
- var action ;
91
+ var action = 'NONE' ;
92
92
var oldAction = 'NONE' ;
93
93
94
94
var oldInputInnerHtml = '' ;
300
300
oldInputInnerHtml = '' ;
301
301
}
302
302
if ( action === 'CONTINUE_READ' ) {
303
- action = oldAction . startsWith ( 'READ' ) ? oldAction : 'READ' ;
303
+ action = ( oldAction && oldAction . startsWith ( 'READ' ) ) ? oldAction : 'READ' ;
304
304
logDebug ( 'CONTINUE_READ received. Switching to: ' + action ) ;
305
305
oldInputInnerHtml = '' ;
306
306
inputElem . setAttribute ( "contenteditable" , true ) ;
307
307
inputElem . focus ( ) ;
308
308
}
309
- if ( action . startsWith ( 'READ' ) ) {
309
+ if ( action && action . startsWith ( 'READ' ) ) {
310
310
if ( oldInputInnerHtml ) {
311
311
nextTextTermPairIsCurrentLine = true ;
312
312
createNewTextTermPair ( "" , null , true ) ;
You can’t perform that action at this time.
0 commit comments