Skip to content

Commit

Permalink
fix: if a task label exists that itself is equal to a 1st level task …
Browse files Browse the repository at this point in the history
…group name of another task (as per the separator char), the tree breaks. [fixes #149]
  • Loading branch information
spmeesseman committed Jun 6, 2021
1 parent f5d5b32 commit 3716ca7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tree/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,9 @@ export class TaskTreeDataProvider implements TreeDataProvider<TreeItem>
subfolder.addTreeNode(each); // addScript will set the group level on the TaskItem
}

prevName = label.split(groupSeparator);
if (label.includes(groupSeparator)) {
prevName = label.split(groupSeparator);
}
prevTaskItem = each;
}

Expand Down
10 changes: 10 additions & 0 deletions test-files/make/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
test:
deno test --import-map=import_map.json --no-check

test-watch:
deno test --import-map=import_map.json --no-check --watch

coverage:
deno test --import-map=import_map.json --no-check --coverage=cov_profile
deno coverage cov_profile
rm -rf cov_profile

0 comments on commit 3716ca7

Please sign in to comment.