diff options
author | ab <abdullah_ahmed@brown.edu> | 2019-07-03 14:53:02 -0400 |
---|---|---|
committer | ab <abdullah_ahmed@brown.edu> | 2019-07-03 14:53:02 -0400 |
commit | a8b20e870214e498a9530130de1dae8284e04a1a (patch) | |
tree | e941752ff4ec28693e3c61d04f94b9c2d8d79eae /src | |
parent | d39d67d6b34d28b444a06e89a8e34165461b5997 (diff) |
fixed null docview
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/FormattedTextBox.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx index 83d1917a2..340455677 100644 --- a/src/client/views/nodes/FormattedTextBox.tsx +++ b/src/client/views/nodes/FormattedTextBox.tsx @@ -140,7 +140,7 @@ export class FormattedTextBox extends DocComponent<(FieldViewProps & FormattedTe } public highlightSearchTerms = (terms: String[]) => { - if (this._editorView) { + if (this._editorView && (this._editorView as any).docView) { const doc = this._editorView.state.doc; const mark = this._editorView.state.schema.mark(this._editorView.state.schema.marks.search_highlight); doc.nodesBetween(0, doc.content.size, (node: ProsNode, pos: number, parent: ProsNode, index: number) => { |