mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-28 15:29:58 +00:00
fix(selector): avoid error Uncaught (in promise) on modal dismiss (fix Eugeny/tabby#8065)
This commit is contained in:
parent
d21282501f
commit
a9c63b5305
@ -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<AppModule> {
|
static forRoot (): ModuleWithProviders<AppModule> {
|
||||||
|
@ -109,6 +109,6 @@ export class CommandService {
|
|||||||
description: c.sublabel,
|
description: c.sublabel,
|
||||||
icon: c.icon,
|
icon: c.icon,
|
||||||
})),
|
})),
|
||||||
)
|
).catch(() => {return})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,8 +13,9 @@ export class FileProvidersService {
|
|||||||
) { }
|
) { }
|
||||||
|
|
||||||
async selectAndStoreFile (description: string): Promise<string> {
|
async selectAndStoreFile (description: string): Promise<string> {
|
||||||
const p = await this.selectProvider()
|
return this.selectProvider().then(p => {
|
||||||
return p.selectAndStoreFile(description)
|
return p.selectAndStoreFile(description)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async retrieveFile (key: string): Promise<Buffer> {
|
async retrieveFile (key: string): Promise<Buffer> {
|
||||||
|
@ -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) {
|
} catch (err) {
|
||||||
reject(err)
|
reject(err)
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,10 @@ export class ProfilesSettingsTabComponent extends BaseComponent {
|
|||||||
name: p.group ? `${this.profilesService.resolveProfileGroupName(p.group)} / ${p.name}` : p.name,
|
name: p.group ? `${this.profilesService.resolveProfileGroupName(p.group)} / ${p.name}` : p.name,
|
||||||
result: p,
|
result: p,
|
||||||
})),
|
})),
|
||||||
)
|
).catch(() => undefined)
|
||||||
|
if (!base) {
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const profile: PartialProfile<Profile> = deepClone(base)
|
const profile: PartialProfile<Profile> = deepClone(base)
|
||||||
delete profile.id
|
delete profile.id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user