summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/CodeParserController.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/CodeParserController.ts b/src/CodeParserController.ts
index 04928e8..8be7034 100644
--- a/src/CodeParserController.ts
+++ b/src/CodeParserController.ts
@@ -57,7 +57,8 @@ export default class CodeParserController {
***************************************************************************/
private check(activeEditor: TextEditor, event: TextDocumentContentChangeEvent): boolean {
- if (activeEditor == null || event.text == null) {
+ if (activeEditor === undefined || activeEditor == null ||
+ event === undefined || event.text == null) {
return false;
}
const activeSelection: Position = activeEditor.selection.active;