This commit is contained in:
Eugene Pankov 2021-07-06 21:47:15 +02:00
parent 40209dc60d
commit 403bafe0a2
3 changed files with 5 additions and 7 deletions

View file

@ -19,15 +19,13 @@ import { BaseTabComponent } from '../components/baseTab.component'
export class TabBodyComponent implements OnChanges {
@Input() @HostBinding('class.active') active: boolean
@Input() tab: BaseTabComponent
@ViewChild('placeholder', { read: ViewContainerRef }) placeholder: ViewContainerRef
@ViewChild('placeholder', { read: ViewContainerRef }) placeholder?: ViewContainerRef
ngOnChanges (changes) {
if (changes.tab) {
if (this.placeholder) {
this.placeholder.detach()
}
this.placeholder?.detach()
setImmediate(() => {
this.placeholder.insert(this.tab.hostView)
this.placeholder?.insert(this.tab.hostView)
})
}
}

View file

@ -50,7 +50,7 @@ export class PluginsSettingsTabComponent {
return plugins
})).subscribe(available => {
for (const plugin of this.pluginManager.installedPlugins) {
this.knownUpgrades[plugin.name] = available.find(x => x.name === plugin.name && semverGt(x.version, plugin.version)) || null
this.knownUpgrades[plugin.name] = available.find(x => x.name === plugin.name && semverGt(x.version, plugin.version)) ?? null
}
})
}

View file

@ -497,7 +497,7 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
return
}
if (this.parent instanceof SplitTabComponent) {
this.allFocusModeSubscription?.unsubscribe?.()
this.allFocusModeSubscription.unsubscribe()
this.allFocusModeSubscription = null
this.parent._allFocusMode = false
this.parent.layout()