fix: avoid error Uncaught (in promise) on modal dismiss

This commit is contained in:
Clem Fern
2023-08-15 19:53:00 +02:00
parent d2752382aa
commit d21282501f
10 changed files with 39 additions and 37 deletions

View File

@@ -175,7 +175,7 @@ export class SaveAsProfileContextMenu extends TabContextMenuItemProvider {
const modal = this.ngbModal.open(PromptModalComponent)
modal.componentInstance.prompt = this.translate.instant('New profile name')
modal.componentInstance.value = tab.profile.name
const name = (await modal.result)?.value
const name = (await modal.result.catch(() => null))?.value
if (!name) {
return
}