From d20746762917fd0378f731fd06e26567dde9e486 Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 24 Apr 2024 18:36:52 -0400 Subject: minor tweaks for merging --- src/client/views/nodes/formattedText/FormattedTextBox.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/client/views/nodes/formattedText') diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index bb910737b..36c1de841 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -984,13 +984,10 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent { - if (!this._editorView) return; if (resIndex < newText.length) { - const marks = this._editorView.state.storedMarks ?? []; - this._editorView.dispatch(this._editorView.state.tr.insertText(newText[resIndex]).setStoredMarks(marks)); - setTimeout(() => { - this.animateRes(resIndex + 1, newText); - }, 20); + const marks = this._editorView?.state.storedMarks ?? []; + this._editorView?.dispatch(this._editorView?.state.tr.insertText(newText[resIndex]).setStoredMarks(marks)); + setTimeout(() => this.animateRes(resIndex + 1, newText), 20); } }; -- cgit v1.2.3-70-g09d2 From ae9404e2c80555875f2fd69f4ae55105ae51168b Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 24 Apr 2024 18:44:28 -0400 Subject: from last --- src/client/views/nodes/formattedText/FormattedTextBox.tsx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/client/views/nodes/formattedText') diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index 36c1de841..a46b19a85 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -996,15 +996,11 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent