diff --git a/tabby-core/src/index.ts b/tabby-core/src/index.ts index ebe1fc44..d0d06789 100644 --- a/tabby-core/src/index.ts +++ b/tabby-core/src/index.ts @@ -229,7 +229,7 @@ export default class AppModule { // eslint-disable-line @typescript-eslint/no-ex }) } - await this.selector.show(this.translate.instant('Select profile'), options) + await this.selector.show(this.translate.instant('Select profile'), options).catch(() => {return}) } static forRoot (): ModuleWithProviders { diff --git a/tabby-core/src/services/commands.service.ts b/tabby-core/src/services/commands.service.ts index f858edcb..dddb2135 100644 --- a/tabby-core/src/services/commands.service.ts +++ b/tabby-core/src/services/commands.service.ts @@ -109,6 +109,6 @@ export class CommandService { description: c.sublabel, icon: c.icon, })), - ) + ).catch(() => {return}) } } diff --git a/tabby-core/src/services/fileProviders.service.ts b/tabby-core/src/services/fileProviders.service.ts index d6983b40..3290e842 100644 --- a/tabby-core/src/services/fileProviders.service.ts +++ b/tabby-core/src/services/fileProviders.service.ts @@ -13,8 +13,9 @@ export class FileProvidersService { ) { } async selectAndStoreFile (description: string): Promise { - const p = await this.selectProvider() - return p.selectAndStoreFile(description) + return this.selectProvider().then(p => { + return p.selectAndStoreFile(description) + }) } async retrieveFile (key: string): Promise { diff --git a/tabby-core/src/services/profiles.service.ts b/tabby-core/src/services/profiles.service.ts index f0616a26..2501bca0 100644 --- a/tabby-core/src/services/profiles.service.ts +++ b/tabby-core/src/services/profiles.service.ts @@ -323,7 +323,7 @@ export class ProfilesService { } }) - await this.selector.show(this.translate.instant('Select profile or enter an address'), options) + await this.selector.show(this.translate.instant('Select profile or enter an address'), options).catch(() => resolve(null)) } catch (err) { reject(err) } diff --git a/tabby-settings/src/components/profilesSettingsTab.component.ts b/tabby-settings/src/components/profilesSettingsTab.component.ts index 1e89b3e9..9a3589dc 100644 --- a/tabby-settings/src/components/profilesSettingsTab.component.ts +++ b/tabby-settings/src/components/profilesSettingsTab.component.ts @@ -65,7 +65,10 @@ export class ProfilesSettingsTabComponent extends BaseComponent { name: p.group ? `${this.profilesService.resolveProfileGroupName(p.group)} / ${p.name}` : p.name, result: p, })), - ) + ).catch(() => undefined) + if (!base) { + return + } } const profile: PartialProfile = deepClone(base) delete profile.id