Skip to content

Commit 6eb243e

Browse files
committed
Fix deactivate() for vscode-client
The deactivate function was throwing exceptions as the `client` var didn't always have a value. Handle this by checking the var and returning undefined if it doesn't exist.
1 parent 57e0c4a commit 6eb243e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

vscode-client/src/extension.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ export async function activate(context: ExtensionContext) {
7070
}
7171
}
7272

73-
export function deactivate() {
73+
export function deactivate(): Thenable<void> | undefined {
74+
if (!client) {
75+
return undefined
76+
}
7477
return client.stop()
7578
}

0 commit comments

Comments
 (0)