File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -310,11 +310,11 @@ const Editor = Module("editor", {
310
310
nsEditor instanceof Ci . nsIHTMLEditor ;
311
311
}
312
312
else {
313
- if ( field !== undefined ) {
314
- textBox = field ; // if I reply 'yes', textBox.value == 'yes', so get the real value
315
- } else {
316
- textBox = liberator . focus ;
317
- }
313
+ if ( field !== undefined ) {
314
+ textBox = field ; // if I reply 'yes', textBox.value == 'yes', so get the real value
315
+ } else {
316
+ textBox = liberator . focus ;
317
+ }
318
318
}
319
319
320
320
if ( ! forceEditing && textBox && textBox . type == "password" ) {
@@ -446,6 +446,9 @@ const Editor = Module("editor", {
446
446
if ( ! textbox )
447
447
return false ;
448
448
let text = textbox . value ;
449
+ if ( typeof text !== "string" )
450
+ return false ;
451
+
449
452
let currStart = textbox . selectionStart ;
450
453
let currEnd = textbox . selectionEnd ;
451
454
let foundWord = text . substring ( 0 , currStart ) . replace ( / .* [ \s \n ] / gm, '' ) . match ( RegExp ( '(' + abbreviations . _match + ')$' ) ) ;
You can’t perform that action at this time.
0 commit comments