mirror of
https://github.com/Eugeny/tabby.git
synced 2025-03-31 15:50:28 +08:00
fixed #9492 - tabs not closing on session exit
This commit is contained in:
parent
3f160eee46
commit
68ca4ac9c0
@ -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
|
||||
}
|
||||
|
@ -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)
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user