Fix the issue where we sometimes need to wait for GPO teams properly (#2621)

This commit is contained in:
Devin Binnie
2023-03-20 16:24:07 -04:00
committed by GitHub
parent a4444bda1e
commit c85a4497b6
5 changed files with 31 additions and 42 deletions

View File

@@ -106,9 +106,17 @@ export class Config extends EventEmitter {
if (process.platform === 'darwin' || process.platform === 'win32') {
nativeTheme.on('updated', this.handleUpdateTheme);
}
this.registryConfig = new RegistryConfig();
this.registryConfig.once(REGISTRY_READ_EVENT, this.loadRegistry);
this.registryConfig.init();
}
initRegistry = () => {
return new Promise<void>((resolve) => {
this.registryConfig = new RegistryConfig();
this.registryConfig.once(REGISTRY_READ_EVENT, (data) => {
this.loadRegistry(data);
resolve();
});
this.registryConfig.init();
});
}
/**