aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2020-02-24 20:18:13 -0500
committerSam Wilkins <samwilkins333@gmail.com>2020-02-24 20:18:13 -0500
commite93a5c7e3fa62ac7dfe324276c7b0bff5b44a1da (patch)
treefe96c2ab6dd5e4844ae76d98516bd1e2f8510c17
parent13e6971c50d4efbb71c551a4570bf59fd5e091c2 (diff)
null check
-rw-r--r--src/client/views/nodes/FormattedTextBox.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx
index f865eafa1..eac495082 100644
--- a/src/client/views/nodes/FormattedTextBox.tsx
+++ b/src/client/views/nodes/FormattedTextBox.tsx
@@ -505,9 +505,9 @@ export class FormattedTextBox extends DocAnnotatableComponent<(FieldViewProps &
this._reactionDisposer = reaction(
() => {
if (this.dataDoc[this.props.fieldKey + "-noTemplate"] || !this.props.Document._textTemplate) {
- return Cast(this.dataDoc[this.props.fieldKey], RichTextField, null).Data;
+ return Cast(this.dataDoc[this.props.fieldKey], RichTextField, null)?.Data;
}
- return Cast(this.props.Document._textTemplate, RichTextField, null).Data;
+ return Cast(this.props.Document._textTemplate, RichTextField, null)?.Data;
},
incomingValue => {
if (incomingValue !== undefined && this._editorView && !this._applyingChange) {