File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1148,19 +1148,23 @@ async function loadWordsHistory(): Promise<boolean> {
11481148 ) !== null ;
11491149 let wordEl = "" ;
11501150 try {
1151- if ( input === undefined || input === "" )
1151+ if ( input === undefined || input === "" ) {
11521152 throw new Error ( "empty input word" ) ;
1153+ }
1154+
1155+ const errorClass = input !== word ? "error" : "" ;
1156+
11531157 if ( corrected !== undefined && corrected !== "" ) {
11541158 const correctedChar = ! containsKorean
11551159 ? corrected
11561160 : Hangul . assemble ( corrected . split ( "" ) ) ;
1157- wordEl = `<div class='word nocursor' burst="${
1161+ wordEl = `<div class='word nocursor ${ errorClass } ' burst="${
11581162 TestInput . burstHistory [ i ]
11591163 } " input="${ correctedChar
11601164 . replace ( / " / g, """ )
11611165 . replace ( / / g, "_" ) } ">`;
11621166 } else {
1163- wordEl = `<div class='word nocursor' burst="${
1167+ wordEl = `<div class='word nocursor ${ errorClass } ' burst="${
11641168 TestInput . burstHistory [ i ]
11651169 } " input="${ input . replace ( / " / g, """ ) . replace ( / / g, "_" ) } ">`;
11661170 }
You can’t perform that action at this time.
0 commit comments