File tree Expand file tree Collapse file tree
src/vs/platform/localizations/node Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ class LanguagePacksCache extends Disposable {
9393 private languagePacks : { [ language : string ] : ILanguagePack } = { } ;
9494 private languagePacksFilePath : string ;
9595 private languagePacksFileLimiter : Queue < any > ;
96+ private initializedCache : boolean ;
9697
9798 constructor (
9899 @IEnvironmentService environmentService : IEnvironmentService ,
@@ -105,7 +106,7 @@ class LanguagePacksCache extends Disposable {
105106
106107 getLanguagePacks ( ) : Promise < { [ language : string ] : ILanguagePack } > {
107108 // if queue is not empty, fetch from disk
108- if ( this . languagePacksFileLimiter . size ) {
109+ if ( this . languagePacksFileLimiter . size || ! this . initializedCache ) {
109110 return this . withLanguagePacks ( )
110111 . then ( ( ) => this . languagePacks ) ;
111112 }
@@ -175,6 +176,7 @@ class LanguagePacksCache extends Disposable {
175176 }
176177 }
177178 this . languagePacks = languagePacks ;
179+ this . initializedCache = true ;
178180 const raw = JSON . stringify ( this . languagePacks ) ;
179181 this . logService . debug ( 'Writing language packs' , raw ) ;
180182 return pfs . writeFile ( this . languagePacksFilePath , raw ) ;
You can’t perform that action at this time.
0 commit comments