Skip to content

Commit b81c752

Browse files
rgrunberfbricon
authored andcommitted
Continue to support VS Code 1.50
- Undo our update of the VS Code engine requirement to ^1.53.2, moving it down to ^1.50.0 - Allow those basing their language client off of VS Code 1.50.0 to continue to use this version and not be forced to install an earlier version - Guard the 'api' field (which holds the reference view) if using a version that does not support it Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
1 parent 2e472bc commit b81c752

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"preview": true,
1212
"enableProposedApi": false,
1313
"engines": {
14-
"vscode": "^1.53.2"
14+
"vscode": "^1.50.0"
1515
},
1616
"repository": {
1717
"type": "git",
@@ -1053,7 +1053,7 @@
10531053
"@types/lodash.findindex": "^4.6.6",
10541054
"@types/mocha": "^5.2.5",
10551055
"@types/node": "^8.10.51",
1056-
"@types/vscode": "^1.53.0",
1056+
"@types/vscode": "^1.50.0",
10571057
"@types/winreg": "^1.2.30",
10581058
"@types/winston": "^2.4.4",
10591059
"gulp": "^4.0.2",

src/typeHierarchy/typeHierarchyTree.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ export class TypeHierarchyTree {
3131
if (!this.initialized) {
3232
await this.initialize();
3333
}
34+
if (!this.api) {
35+
return;
36+
}
3437
if (this.cancelTokenSource) {
3538
this.cancelTokenSource.cancel();
3639
}
@@ -65,6 +68,9 @@ export class TypeHierarchyTree {
6568
}
6669

6770
public changeDirection(direction: TypeHierarchyDirection): void {
71+
if (!this.api) {
72+
return;
73+
}
6874
if (this.cancelTokenSource) {
6975
this.cancelTokenSource.cancel();
7076
}
@@ -77,6 +83,9 @@ export class TypeHierarchyTree {
7783
}
7884

7985
public async changeBaseItem(item: TypeHierarchyItem): Promise<void> {
86+
if (!this.api) {
87+
return;
88+
}
8089
if (this.cancelTokenSource) {
8190
this.cancelTokenSource.cancel();
8291
}

0 commit comments

Comments
 (0)