summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2018-06-25 11:21:41 +0200
committerChristoph Schlosser <christophschlosser@users.noreply.github.com>2018-06-26 17:58:53 +0200
commitfbda6e3b2b54da6d32a93eda7794d5554f1eacf2 (patch)
tree02d2875007845f87f9286f1464e5a3bb185a63ff
parenta88873c3b0287cf6b42038104b93801d22c2e8cd (diff)
downloaddoxdocgen-fbda6e3b2b54da6d32a93eda7794d5554f1eacf2.tar.gz
Check if editor and event are undefined
-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;