@@ -24,7 +24,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment'
2424import { Schemas } from 'vs/base/common/network' ;
2525import { IBackupFileService } from 'vs/workbench/services/backup/common/backup' ;
2626import { getInstalledExtensions , IExtensionStatus , onExtensionChanged , isKeymapExtension } from 'vs/workbench/parts/extensions/electron-browser/extensionsUtils' ;
27- import { IExtensionEnablementService , IExtensionManagementService , IExtensionGalleryService , IExtensionTipsService , EnablementState , LocalExtensionType } from 'vs/platform/extensionManagement/common/extensionManagement' ;
27+ import { IExtensionEnablementService , IExtensionManagementService , IExtensionGalleryService , IExtensionTipsService , EnablementState , LocalExtensionType , ILocalExtension } from 'vs/platform/extensionManagement/common/extensionManagement' ;
2828import { used } from 'vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page' ;
2929import { ILifecycleService , StartupKind } from 'vs/platform/lifecycle/common/lifecycle' ;
3030import { IDisposable , dispose } from 'vs/base/common/lifecycle' ;
@@ -309,6 +309,9 @@ class WelcomePage {
309309 return ;
310310 }
311311 const ul = container . querySelector ( '.recent ul' ) ;
312+ if ( ! ul ) {
313+ return ;
314+ }
312315 const before = ul . firstElementChild ;
313316 workspaces . slice ( 0 , 5 ) . forEach ( workspace => {
314317 let label : string ;
@@ -328,7 +331,7 @@ class WelcomePage {
328331
329332 const a = document . createElement ( 'a' ) ;
330333 let name = label ;
331- let parentFolderPath : string ;
334+ let parentFolderPath : string | undefined ;
332335
333336 if ( resource . scheme === Schemas . file ) {
334337 let parentFolder = path . dirname ( resource . fsPath ) ;
@@ -456,7 +459,7 @@ class WelcomePage {
456459 return ;
457460 }
458461 const foundAndInstalled = installedExtension ? Promise . resolve ( installedExtension . local ) : this . extensionGalleryService . query ( { names : [ extensionSuggestion . id ] , source : telemetryFrom } )
459- . then ( result => {
462+ . then ( ( result ) : null | Promise < ILocalExtension | null > => {
460463 const [ extension ] = result . firstPage ;
461464 if ( ! extension ) {
462465 return null ;
0 commit comments