From fbda6e3b2b54da6d32a93eda7794d5554f1eacf2 Mon Sep 17 00:00:00 2001 From: Christoph Schlosser Date: Mon, 25 Jun 2018 11:21:41 +0200 Subject: Check if editor and event are undefined --- src/CodeParserController.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3