mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Init assets in dialog model (#15533)
* check that there are assets before filtering * init assets as empty array
This commit is contained in:
@@ -250,13 +250,15 @@ export class RemoteBookDialog {
|
||||
}
|
||||
|
||||
public async fillVersionDropdown(): Promise<void> {
|
||||
let filtered_assets = (await this.controller.getAssets()).filter(asset => asset.book === this.bookDropdown.value);
|
||||
const assets = await this.controller.getAssets();
|
||||
let filtered_assets = assets.filter(asset => asset.book === this.bookDropdown.value);
|
||||
this.versionDropdown.values = ['-'].concat(filtered_assets.map(asset => asset.version));
|
||||
this.checkValues();
|
||||
}
|
||||
|
||||
public async fillLanguageDropdown(): Promise<void> {
|
||||
let filtered_assets = (await this.controller.getAssets()).filter(asset => asset.book === this.bookDropdown.value &&
|
||||
const assets = await this.controller.getAssets();
|
||||
let filtered_assets = assets.filter(asset => asset.book === this.bookDropdown.value &&
|
||||
asset.version === this.versionDropdown.value);
|
||||
this.languageDropdown.values = ['-'].concat(filtered_assets.map(asset => asset.language));
|
||||
this.checkValues();
|
||||
|
||||
Reference in New Issue
Block a user