From a2195058135bfac873aba2a5e8677baf8d90b201 Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 9 May 2025 23:09:35 -0400 Subject: fixed reaction exception from accessing props and not _props --- src/client/views/nodes/formattedText/FormattedTextBox.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index 97049d0eb..10becc00b 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -307,11 +307,10 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent { this.Document.$tags_chat = new List(); - gptAPICall(RTFCast(this.Document[Doc.LayoutDataKey(this.Document)])?.Text ?? StrCast(this.Document[Doc.LayoutDataKey(this.Document)]), - GPTCallType.CLASSIFYTEXT).then(desc => (this.Document.$tags_chat as List).push(desc)); + gptAPICall(RTFCast(this.Document[Doc.LayoutDataKey(this.Document)])?.Text ?? StrCast(this.Document[Doc.LayoutDataKey(this.Document)]), GPTCallType.CLASSIFYTEXT).then(desc => (this.Document.$tags_chat as List).push(desc)); this.Document._layout_showTags = true; - //or... then(desc => this.Document.$tags_chat = desc); - } + //or... then(desc => this.Document.$tags_chat = desc); + }; leafText = (node: Node) => { if (node.type === this.EditorView?.state.schema.nodes.dashField) { @@ -1246,7 +1245,6 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent Doc.IsSearchMatch(this.Document), @@ -1281,13 +1279,13 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent ({ title: this.Document.title, sel: this.props.isSelected() }), + () => ({ title: this.Document.title, sel: this._props.isSelected() }), action(() => { this.autoTag(); }), { fireImmediately: true } ); - + if (!this._props.dontRegisterView) { this._disposers.record = reaction( () => this.recordingDictation, -- cgit v1.2.3-70-g09d2