Skip to content

Commit

Permalink
fixed #9492 - tabs not closing on session exit
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Mar 4, 2024
1 parent 3f160ee commit 68ca4ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tabby-core/src/components/baseTab.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion tabby-core/src/components/splitTab.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
}
Expand Down

0 comments on commit 68ca4ac

Please sign in to comment.