diff options
| author | Christoph Schlosser <christoph@linux.com> | 2018-06-25 11:21:41 +0200 |
|---|---|---|
| committer | Christoph Schlosser <christophschlosser@users.noreply.github.com> | 2018-06-26 17:58:53 +0200 |
| commit | fbda6e3b2b54da6d32a93eda7794d5554f1eacf2 (patch) | |
| tree | 02d2875007845f87f9286f1464e5a3bb185a63ff | |
| parent | a88873c3b0287cf6b42038104b93801d22c2e8cd (diff) | |
| download | doxdocgen-fbda6e3b2b54da6d32a93eda7794d5554f1eacf2.tar.gz | |
Check if editor and event are undefined
| -rw-r--r-- | src/CodeParserController.ts | 3 |
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; |