Async getting local server path

This commit is contained in:
ziajka 2019-02-26 10:46:36 +01:00
parent c841a3d879
commit bb9cfc988b

View File

@ -36,18 +36,18 @@ export class AddServerDialogComponent implements OnInit {
return 'remote';
}
getDefaultLocalServerPath() {
async getDefaultLocalServerPath() {
if(this.electronService.isElectronApp) {
return this.electronService.remote.require('./local-server.js').getLocalServerPath();
return await this.electronService.remote.require('./local-server.js').getLocalServerPath();
}
return;
}
ngOnInit() {
async ngOnInit() {
this.locations = this.getLocations();
this.server.authorization = 'none';
this.server.location = this.getDefaultLocation();
this.server.path = this.getDefaultLocalServerPath();
this.server.path = await this.getDefaultLocalServerPath();
}
onAddClick(): void {