Skip to content

Commit

Permalink
Fix invalid activeTask
Browse files Browse the repository at this point in the history
  • Loading branch information
marlomgirardi committed Dec 21, 2019
1 parent a7bfe8f commit a3d2744
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.1.2 - 2019-12-21

### Fixes
- Fix `https-proxy-agent` [vulnerability](https://www.npmjs.com/advisories/1184) with `npm audit`.
- Remove file from task when it was not found in the file system.
- Set `activeTask` as `null` when not found in the task's list.

## 0.1.1 - 2019-10-06

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "keep-context",
"displayName": "Keep Context",
"description": "Make context switch easy to be managed and tracked.",
"version": "0.1.1",
"version": "0.1.2",
"publisher": "marlom",
"icon": "images/keep-context.png",
"engines": {
Expand Down
11 changes: 8 additions & 3 deletions src/KeepContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,18 @@ export default class KeepContext {

this.git.onDidChangeBranch = this.onBranchChange;
this.git.onDidInitialize = this.onGitInitialize;
this.treeDataProvider = new ContextTreeDataProvider(this.settings);

if (this.settings.activeTask) {
const task = this.settings.tasks[this.settings.activeTask];
this.updateStatusBar(task.name);
}

this.treeDataProvider = new ContextTreeDataProvider(this.settings);
if (task) {
this.updateStatusBar(task.name);
} else {
this.settings.activeTask = null;
this.treeDataProvider.refresh();
}
}
}

/**
Expand Down

0 comments on commit a3d2744

Please sign in to comment.