Skip to content

Commit

Permalink
fix: editing a package.json or tasks.json file no longer refresh the …
Browse files Browse the repository at this point in the history
…treeview with changes
  • Loading branch information
spmeesseman committed Feb 8, 2021
1 parent 9d31d55 commit de6ffe2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/taskTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,10 @@ export class TaskTreeDataProvider implements TreeDataProvider<TreeItem>
//
if (opt1 && opt1 !== "tests" && opt2 instanceof Uri)
{
await providers.get(!util.isScriptType(opt1) ? opt1 : "script").invalidateTasksCache(opt2);
const provider = providers.get(!util.isScriptType(opt1) ? opt1 : "script");
if (provider) { // NPM and Workspace tasks don't implament the TaskExplorerProvider interface
await provider.invalidateTasksCache(opt2);
}
}
else {
await util.asyncForEach(providers, (p: TaskExplorerProvider) => {
Expand Down

0 comments on commit de6ffe2

Please sign in to comment.