From 3462275b4cb823715ccbe599838009502dc96c5d Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Sat, 28 Sep 2019 02:26:02 -0400 Subject: [PATCH] Fixes parenting --- src/views/nodes/branchOrTagFolderNode.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/nodes/branchOrTagFolderNode.ts b/src/views/nodes/branchOrTagFolderNode.ts index 713bd20..c201838 100644 --- a/src/views/nodes/branchOrTagFolderNode.ts +++ b/src/views/nodes/branchOrTagFolderNode.ts @@ -51,7 +51,7 @@ export class BranchOrTagFolderNode extends ViewNode { children.push( new BranchOrTagFolderNode( this.view, - this.parent!, + this.folderName ? this : this.parent!, this.type, this.repoPath, folder.name, @@ -64,8 +64,8 @@ export class BranchOrTagFolderNode extends ViewNode { continue; } - // Make sure to set ourselves as the parent - (folder.value as any).parent = this; + // Make sure to set the parent + (folder.value as any).parent = this.folderName ? this : this.parent!; children.push(folder.value); }