From e7c9974b554d052d5bf369e2cb82936a024928bb Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 24 Apr 2018 12:24:27 +0200 Subject: [PATCH] explorer: ExplorerItem initialize children when a child is being added fixes #48496 --- src/vs/workbench/parts/files/common/explorerModel.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vs/workbench/parts/files/common/explorerModel.ts b/src/vs/workbench/parts/files/common/explorerModel.ts index df76d082ac3..afcf1bbefb3 100644 --- a/src/vs/workbench/parts/files/common/explorerModel.ts +++ b/src/vs/workbench/parts/files/common/explorerModel.ts @@ -216,6 +216,9 @@ export class ExplorerItem { * Adds a child element to this folder. */ public addChild(child: ExplorerItem): void { + if (!this.children) { + this.isDirectory = true; + } // Inherit some parent properties to child child.parent = this;