File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -456,12 +456,17 @@ export class DependencyViewProvider implements vscode.WebviewViewProvider {
456456
457457 public async getAvailableDependencies ( ) : Promise < IJsonList [ ] > {
458458 this . homeDeps = [ ] ;
459- const listURL = this . vendordepMarketplaceURL + `${ this . externalApi . getUtilitiesAPI ( ) . getFrcYear ( ) } .json` ;
460- try {
461- this . onlineDeps = await this . loadFileFromUrl ( listURL ) ;
462- } catch ( err ) {
463- logger . log ( 'Error fetching file' , err ) ;
459+ if ( this . wp === undefined ) {
464460 this . onlineDeps = [ ] ;
461+ } else {
462+ const projectYear = this . externalApi . getPreferencesAPI ( ) . getPreferences ( this . wp ) . getProjectYear ( ) ;
463+ const manifestURL = this . vendordepMarketplaceURL + `${ projectYear } .json` ;
464+ try {
465+ this . onlineDeps = await this . loadFileFromUrl ( manifestURL ) ;
466+ } catch ( err ) {
467+ logger . log ( 'Error fetching vendordep marketplace manifest' , manifestURL , err ) ;
468+ this . onlineDeps = [ ] ;
469+ }
465470 }
466471 this . homeDeps = await this . vendorLibraries . getHomeDirDeps ( ) ;
467472 this . homeDeps . forEach ( ( homedep ) => {
You can’t perform that action at this time.
0 commit comments