chore(web): Apply suggestions from code review

Co-authored-by: Marc Durdin <marc@durdin.net>
This commit is contained in:
Joshua Horton 2023-03-27 11:56:02 +07:00 committed by GitHub
parent 2f9ab69b57
commit e8d05db4d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -68,7 +68,7 @@ interface LanguageProcessorEventMap {
'tryrevert': () => void,
/**
* Is called synchronously as part of suggestion application when successful.
* Is called synchronously once suggestion application is successful and the context has been updated.
*
* @param outputTarget The `OutputTarget` representation of the context the suggestion was applied to.
* @returns

View file

@ -77,9 +77,8 @@ export default class PredictionContext extends EventEmitter<PredictionContextEve
this.langProcessor = langProcessor;
this.kbdProcessor = kbdProcessor;
const validSuggestionState: () => boolean = () => {
return this.currentTarget && langProcessor.state == 'configured';
}
const validSuggestionState: () => boolean = () =>
this.currentTarget && langProcessor.state == 'configured';
this.suggestionApplier = (suggestion) => {
if(validSuggestionState()) {