提交 43274092 编写于 作者: S SteVen Batten

check if no visible views when determining title

上级 3ba52212
......@@ -347,7 +347,7 @@ class ViewContainerModel extends Disposable implements IViewContainerModel {
private updateContainerInfo(): void {
/* Use default container info if one of the visible view descriptors belongs to the current container by default */
const useDefaultContainerInfo = this.visibleViewDescriptors.some(v => Registry.as<IViewsRegistry>(ViewExtensions.ViewsRegistry).getViewContainer(v.id) === this.container);
const useDefaultContainerInfo = this.visibleViewDescriptors.length === 0 || this.visibleViewDescriptors.some(v => Registry.as<IViewsRegistry>(ViewExtensions.ViewsRegistry).getViewContainer(v.id) === this.container);
const title = useDefaultContainerInfo ? this.container.name : this.visibleViewDescriptors[0]?.name || '';
let titleChanged: boolean = false;
if (this._title !== title) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册