diff --git a/common/web/input-processor/src/text/prediction/predictionContext.ts b/common/web/input-processor/src/text/prediction/predictionContext.ts index 7578545b985..eebccb0fe3e 100644 --- a/common/web/input-processor/src/text/prediction/predictionContext.ts +++ b/common/web/input-processor/src/text/prediction/predictionContext.ts @@ -172,7 +172,7 @@ export default class PredictionContext extends EventEmitter`; else, `null`. */ - public accept(suggestion: Suggestion): Promise | null { + public accept(suggestion: Suggestion): Promise | Promise { let _this = this; // Selecting a suggestion or a reversion should both clear selection @@ -188,7 +188,8 @@ export default class PredictionContext extends EventEmitter { }); // And now, apply the reversion itself. - let returnValue = predictiveContext.accept(reversion); + let returnValue = await predictiveContext.accept(reversion); // 'accepting' a reversion performs a rewind; there's no need for async ops here. assert.isNull(returnValue); // as per the method's spec.