cleanup more async

This commit is contained in:
Joao Moreno
2018-07-03 09:04:59 +02:00
parent 727c6f3537
commit 51afe35d02
5 changed files with 69 additions and 68 deletions

View File

@@ -401,17 +401,17 @@ export class MainThreadSCM implements MainThreadSCMShape {
}
if (enabled) {
repository.input.validateInput = async (value, pos): TPromise<IInputValidation | undefined> => {
const result = await this._proxy.$validateInput(sourceControlHandle, value, pos);
repository.input.validateInput = (value, pos): TPromise<IInputValidation | undefined> => {
return this._proxy.$validateInput(sourceControlHandle, value, pos).then(result => {
if (!result) {
return undefined;
}
if (!result) {
return undefined;
}
return {
message: result[0],
type: result[1]
};
return {
message: result[0],
type: result[1]
};
});
};
} else {
repository.input.validateInput = () => TPromise.as(undefined);