diff options
author | bobzel <zzzman@gmail.com> | 2025-05-09 23:09:35 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2025-05-09 23:09:35 -0400 |
commit | a2195058135bfac873aba2a5e8677baf8d90b201 (patch) | |
tree | 8ccc4b5ee54e7f1ef97bb4e7bb4f552227177a21 /src | |
parent | afc2b90c3eab26a8a3d17bdb711652b68d2528d9 (diff) |
fixed reaction exception from accessing props and not _props
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/formattedText/FormattedTextBox.tsx | 12 |
1 files changed, 5 insertions, 7 deletions
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<FormattedTextB autoTag = async () => { this.Document.$tags_chat = new List<string>(); - 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<string>).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<string>).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<FormattedTextB }, { fireImmediately: true } ); - this._disposers.search = reaction( () => Doc.IsSearchMatch(this.Document), @@ -1281,13 +1279,13 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FormattedTextB ); this._disposers.tagger = reaction( - () => ({ 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, |