From e93a5c7e3fa62ac7dfe324276c7b0bff5b44a1da Mon Sep 17 00:00:00 2001 From: Sam Wilkins Date: Mon, 24 Feb 2020 20:18:13 -0500 Subject: null check --- src/client/views/nodes/FormattedTextBox.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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) { -- cgit v1.2.3-70-g09d2