fix allElectronAPIsExist intialisation

This commit is contained in:
Abhinav 2021-12-19 15:23:36 +05:30
parent fc62728d85
commit f45fd0d0e4

View file

@ -109,7 +109,7 @@ class ExportService {
constructor() { constructor() {
this.ElectronAPIs = runningInBrowser() && window['ElectronAPIs']; this.ElectronAPIs = runningInBrowser() && window['ElectronAPIs'];
this.allElectronAPIsExist = !!this.ElectronAPIs.exists; this.allElectronAPIsExist = !!this.ElectronAPIs?.exists;
} }
async selectExportDirectory() { async selectExportDirectory() {
return await this.ElectronAPIs.selectRootDirectory(); return await this.ElectronAPIs.selectRootDirectory();