aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/EditableView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-08-12 21:38:22 -0400
committerbobzel <zzzman@gmail.com>2024-08-12 21:38:22 -0400
commitb84bdc5a629dfa6310b24dd5eedee2843558b73a (patch)
treeb22a0630991f39ed166de0599f9b14d3e9f13b2e /src/client/views/EditableView.tsx
parent762ac2bf354e4cc2c4b15f42502da939f5061646 (diff)
more any -> type fixes
Diffstat (limited to 'src/client/views/EditableView.tsx')
-rw-r--r--src/client/views/EditableView.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx
index e02e39b8b..23da5a666 100644
--- a/src/client/views/EditableView.tsx
+++ b/src/client/views/EditableView.tsx
@@ -26,7 +26,7 @@ export interface EditableProps {
/**
* The contents to render when not editing
*/
- contents: string;
+ contents: JSX.Element | string;
fieldContents?: FieldViewProps;
fontStyle?: string;
fontSize?: number;
@@ -301,7 +301,7 @@ export class EditableView extends ObservableReactComponent<EditableProps> {
fontStyle: this._props.fontStyle,
fontSize: this._props.fontSize,
}}>
- {this._props.fieldContents ? <FieldView {...this._props.fieldContents} /> : this._props.contents ? this._props.contents?.valueOf() : ''}
+ {this._props.fieldContents ? <FieldView {...this._props.fieldContents} /> : (this._props.contents ?? '')}
</span>
</div>
);