1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-08-15 23:40:32 +03:00

fixed #9492 - tabs not closing on session exit

This commit is contained in:
Eugene 2024-03-04 10:40:14 +01:00
parent 3f160eee46
commit 68ca4ac9c0
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
2 changed files with 5 additions and 2 deletions

View File

@ -195,7 +195,10 @@ export abstract class BaseTabComponent extends BaseComponent {
if (!this.viewContainer || !this.viewContainerEmbeddedRef) {
return
}
this.viewContainer.detach(this.viewContainer.indexOf(this.viewContainerEmbeddedRef))
const viewIndex = this.viewContainer.indexOf(this.viewContainerEmbeddedRef)
if (viewIndex !== -1) {
this.viewContainer.detach(viewIndex)
}
this.viewContainerEmbeddedRef = undefined
this.viewContainer = undefined
}

View File

@ -841,7 +841,7 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit
tab.subscribeUntilDestroyed(tab.recoveryStateChangedHint$, () => {
this.recoveryStateChangedHint.next()
})
tab.subscribeUntilDestroyed(tab.destroyed$, () => {
tab.destroyed$.subscribe(() => {
this.removeTab(tab)
})
}