mirror of
https://github.com/Eugeny/tabby.git
synced 2025-10-05 22:44:55 +00:00
fix: avoid error Uncaught (in promise) on modal dismiss
This commit is contained in:
@@ -285,7 +285,7 @@ export class VaultFileProvider extends FileProvider {
|
||||
icon: 'fas fa-file',
|
||||
result: f,
|
||||
})),
|
||||
])
|
||||
]).catch(() => null)
|
||||
if (result) {
|
||||
return `${this.prefix}${result.key.id}`
|
||||
}
|
||||
|
@@ -149,7 +149,7 @@ export class CommonOptionsContextMenu extends TabContextMenuItemProvider {
|
||||
click: async () => {
|
||||
const modal = this.ngbModal.open(PromptModalComponent)
|
||||
modal.componentInstance.prompt = this.translate.instant('Profile name')
|
||||
const name = (await modal.result)?.value
|
||||
const name = (await modal.result.catch(() => null))?.value
|
||||
if (!name) {
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user