From 4dcac6193637d382358588256c55071e585ed4d5 Mon Sep 17 00:00:00 2001 From: Josh Johnson Date: Fri, 8 Jan 2016 21:50:30 -0500 Subject: [PATCH] Fix #15 --- src/Extension.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Extension.ts b/src/Extension.ts index e54d51e..379655b 100644 --- a/src/Extension.ts +++ b/src/Extension.ts @@ -51,6 +51,10 @@ export function deactivate() { } function _handleContextChange(editor: vsc.TextEditor): void { + if (!editor || !editor.document) { + return; + } + switch (editor.document.languageId) { case 'xquery': XQueryLintingFeatureProvider.provideXQueryDiagnostics(editor);