docs(web): adds suggested documentation from code review

Co-authored-by: Marc Durdin <marc@durdin.net>
This commit is contained in:
Joshua Horton 2024-05-31 10:06:05 +07:00 committed by GitHub
parent 487a28da8e
commit c4932b7fd1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -168,6 +168,10 @@ export default class LanguageProcessor extends EventEmitter<LanguageProcessorEve
let transcription = outputTarget.buildTranscriptionFrom(outputTarget, null, false);
return this.predict_internal(transcription, true, layerId);
} else {
// if there's no active context source, there's nothing to
// provide suggestions for. In that case, there's no reason
// to even request suggestions, so bypass the prediction
// engine and say that there aren't any.
return Promise.resolve([]);
}
}