diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2019-10-08 19:59:28 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2019-10-08 19:59:28 -0400 |
commit | 6a0ceec907cd859e9f60bcf9a81eec177db1e09f (patch) | |
tree | 8c9f9f1cf9870543caf216550ffc5a8b5efea636 /src | |
parent | 29cdf0d66df3e38408f69ac8225b4d59397ee2e6 (diff) |
handled crash
Diffstat (limited to 'src')
-rw-r--r-- | src/client/util/TooltipTextMenu.tsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/util/TooltipTextMenu.tsx b/src/client/util/TooltipTextMenu.tsx index fe4c5ac9f..e162ad475 100644 --- a/src/client/util/TooltipTextMenu.tsx +++ b/src/client/util/TooltipTextMenu.tsx @@ -844,6 +844,10 @@ export class TooltipTextMenu { update(view: EditorView, lastState: EditorState | undefined) { this.updateFromDash(view, lastState, this.editorProps) } //updates the tooltip menu when the selection changes public updateFromDash(view: EditorView, lastState: EditorState | undefined, props: any) { + if (!view) { + console.log("no editor? why?") + return; + } this.view = view; let state = view.state; DocumentDecorations.Instance.TextBar && DocumentDecorations.Instance.setTextBar(DocumentDecorations.Instance.TextBar); |