From dc20525c09943fef332f8e7dac54aab3039e8df7 Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 10 May 2024 16:34:37 -0400 Subject: fixed exception when text templates have no inherited data, and when text views are modified after the editor has been destroyed. random code cleanup --- src/client/views/nodes/formattedText/FormattedTextBox.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/client/views/nodes/formattedText/FormattedTextBox.tsx') diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index 624721d7c..e62a639c8 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -320,7 +320,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent { - if (this._editorView) { + if (this._editorView && !this._editorView.isDestroyed) { const state = this._editorView.state.apply(tx); this._editorView.updateState(state); this.tryUpdateDoc(false); @@ -353,6 +353,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent