Fix rest of notebook unhandled promises (#16933)

* Fix rest of notebook unhandled promises

* add rule

* fix some tests
This commit is contained in:
Charles Gagnon
2021-08-30 14:14:48 -07:00
committed by GitHub
parent 26e08fdf9e
commit 76e01fee60
21 changed files with 79 additions and 53 deletions

View File

@@ -135,7 +135,7 @@ export class InstalledPackagesTab {
await view.initializeModel(this.installedPackagesLoader);
await this.loadInstalledPackagesInfo();
this.packageTypeDropdown.focus();
await this.packageTypeDropdown.focus();
});
}
@@ -252,7 +252,7 @@ export class InstalledPackagesTab {
return;
}
this.uninstallPackageButton.updateProperties({ enabled: false });
await this.uninstallPackageButton.updateProperties({ enabled: false });
let doUninstall = await this.prompter.promptSingle<boolean>(<IQuestion>{
type: QuestionTypes.confirm,
message: localize('managePackages.confirmUninstall', "Are you sure you want to uninstall the specified packages?"),
@@ -309,6 +309,6 @@ export class InstalledPackagesTab {
}
}
this.uninstallPackageButton.updateProperties({ enabled: true });
await this.uninstallPackageButton.updateProperties({ enabled: true });
}
}

View File

@@ -100,7 +100,7 @@ export class RemoteBookDialog {
}).component();
this.languageDropdown.onValueChanged(async () => this.checkValues());
this.setFieldsToEmpty();
await this.setFieldsToEmpty();
this.formModel = this.view.modelBuilder.formContainer()
.withFormItems([{
@@ -191,7 +191,7 @@ export class RemoteBookDialog {
if (releases) {
this.releaseDropdown.enabled = true;
await this.fillReleasesDropdown();
this.setFieldsToEmpty();
await this.setFieldsToEmpty();
}
} else {
throw new Error(loc.urlGithubError);
@@ -200,7 +200,7 @@ export class RemoteBookDialog {
}
catch (error) {
await this.fillReleasesDropdown();
this.setFieldsToEmpty();
await this.setFieldsToEmpty();
this.showErrorMessage(error.message);
}
}
@@ -219,7 +219,7 @@ export class RemoteBookDialog {
}
}
catch (error) {
this.setFieldsToEmpty();
await this.setFieldsToEmpty();
this.showErrorMessage(error.message);
}
}