@@ -95,7 +95,7 @@ export class CondaEnvManager implements EnvironmentManager, Disposable {
9595 title : CondaStrings . condaDiscovering ,
9696 } ,
9797 async ( ) => {
98- this . collection = await refreshCondaEnvs ( false , this . nativeFinder , this . api , this . log , this ) ;
98+ this . collection = ( await refreshCondaEnvs ( false , this . nativeFinder , this . api , this . log , this ) ) ?? [ ] ;
9999 await this . loadEnvMap ( ) ;
100100
101101 this . _onDidChangeEnvironments . fire (
@@ -246,7 +246,7 @@ export class CondaEnvManager implements EnvironmentManager, Disposable {
246246 async ( ) => {
247247 this . log . info ( 'Refreshing Conda Environments' ) ;
248248 const discard = this . collection . map ( ( c ) => c ) ;
249- this . collection = await refreshCondaEnvs ( true , this . nativeFinder , this . api , this . log , this ) ;
249+ this . collection = ( await refreshCondaEnvs ( true , this . nativeFinder , this . api , this . log , this ) ) ?? [ ] ;
250250
251251 await this . loadEnvMap ( ) ;
252252
@@ -273,7 +273,7 @@ export class CondaEnvManager implements EnvironmentManager, Disposable {
273273 resolve : ( p ) => resolveCondaPath ( p , this . nativeFinder , this . api , this . log , this ) ,
274274 startBackgroundInit : ( ) =>
275275 withProgress ( { location : ProgressLocation . Window , title : CondaStrings . condaDiscovering } , async ( ) => {
276- this . collection = await refreshCondaEnvs ( false , this . nativeFinder , this . api , this . log , this ) ;
276+ this . collection = ( await refreshCondaEnvs ( false , this . nativeFinder , this . api , this . log , this ) ) ?? [ ] ;
277277 await this . loadEnvMap ( ) ;
278278 this . _onDidChangeEnvironments . fire (
279279 this . collection . map ( ( e ) => ( {
0 commit comments