diff options
| author | bobzel <zzzman@gmail.com> | 2020-08-11 18:44:41 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-08-11 18:44:41 -0400 |
| commit | ad857128179535bb5d5943d2f22aae05204c4fff (patch) | |
| tree | 96eb4320471763ac35626678952afd996661c94f /src/client/views/nodes/formattedText | |
| parent | 4ad893b89a8c47468fd9fed988e2a83c00547c9e (diff) | |
fixed error with highlighting search terms in formatted text. fixed tree view to show correct bullet icon
Diffstat (limited to 'src/client/views/nodes/formattedText')
| -rw-r--r-- | src/client/views/nodes/formattedText/FormattedTextBox.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index 31d69327b..571f4fb88 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -407,7 +407,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp const lastSel = Math.min(flattened.length - 1, this._searchIndex); flattened.forEach((h: TextSelection, ind: number) => tr = tr.addMark(h.from, h.to, ind === lastSel ? activeMark : mark)); - this._editorView.dispatch(tr.setSelection(new TextSelection(tr.doc.resolve(flattened[lastSel].from), tr.doc.resolve(flattened[lastSel].to))).scrollIntoView()); + flattened[lastSel] && this._editorView.dispatch(tr.setSelection(new TextSelection(tr.doc.resolve(flattened[lastSel].from), tr.doc.resolve(flattened[lastSel].to))).scrollIntoView()); console.log(this._searchIndex); } |
