mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Fixes bug when opening the scheduler dialog (#6624)
Checks if the loading component is loaded before using it
This commit is contained in:
@@ -40,7 +40,9 @@ export class PickScheduleDialog {
|
||||
|
||||
public async showDialog() {
|
||||
this.model.initialize().then((result) => {
|
||||
this.loadingComponent.loading = false;
|
||||
if (this.loadingComponent) {
|
||||
this.loadingComponent.loading = false;
|
||||
}
|
||||
if (this.model.schedules) {
|
||||
let data: any[][] = [];
|
||||
for (let i = 0; i < this.model.schedules.length; ++i) {
|
||||
@@ -80,7 +82,7 @@ export class PickScheduleDialog {
|
||||
}]).withLayout({ width: '100%' }).component();
|
||||
|
||||
this.loadingComponent = view.modelBuilder.loadingComponent().withItem(formModel).component();
|
||||
this.loadingComponent.loading = true;
|
||||
this.loadingComponent.loading = !this.model.isInitialized();
|
||||
await view.initializeModel(this.loadingComponent);
|
||||
});
|
||||
}
|
||||
@@ -101,4 +103,4 @@ export class PickScheduleDialog {
|
||||
this.model.selectedSchedule = this.model.schedules[selectedRow];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user