diff options
author | bobzel <zzzman@gmail.com> | 2024-03-25 14:25:49 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-03-25 14:25:49 -0400 |
commit | e0b846bf66b5d830b452ce0faa73eeb5f8a6cdcd (patch) | |
tree | d69f29aa004d0979f547478d1201535a7bc71772 /src | |
parent | 38d639456f6acbb15ad2342d4f9dfd9bb22fa8cb (diff) |
fixed exception in comparison box
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/ComparisonBox.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/nodes/ComparisonBox.tsx b/src/client/views/nodes/ComparisonBox.tsx index 62f630c6c..59d99b371 100644 --- a/src/client/views/nodes/ComparisonBox.tsx +++ b/src/client/views/nodes/ComparisonBox.tsx @@ -182,7 +182,7 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps>() // where (this) is replaced by the text in the fieldKey slot abd this.excludeWords is repalced by the conetnts of the excludeWords field // The GPT call will put the "answer" in the second slot of the comparison (eg., text_2) if (whichSlot.endsWith('2') && !layoutTemplateString?.includes(whichSlot)) { - var queryText = altText.replace('(this)', subjectText); // TODO: this should be done in KeyValueBox.setField but it doesn't know about the fieldKey ... + var queryText = altText?.replace('(this)', subjectText); // TODO: this should be done in KeyValueBox.setField but it doesn't know about the fieldKey ... if (queryText && queryText.match(/\(\(.*\)\)/)) { KeyValueBox.SetField(this.Document, whichSlot, ':=' + queryText, false); // make the second slot be a computed field on the data doc that calls ChatGpt } |