diff options
author | bob <bcz@cs.brown.edu> | 2019-05-02 16:19:07 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-05-02 16:19:07 -0400 |
commit | a78282cdf7fbb99386484640e1fb89d4b9b0cbee (patch) | |
tree | 9154148f03f996e5c6fb8c2e367df13736d8b0cc /src/client/views/nodes/FieldView.tsx | |
parent | a79bda7e5c7e77e398a33b8262f861155c5f1462 (diff) |
fixed some things with trees and summaries.
Diffstat (limited to 'src/client/views/nodes/FieldView.tsx')
-rw-r--r-- | src/client/views/nodes/FieldView.tsx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/client/views/nodes/FieldView.tsx b/src/client/views/nodes/FieldView.tsx index 63009f2db..a1e083b36 100644 --- a/src/client/views/nodes/FieldView.tsx +++ b/src/client/views/nodes/FieldView.tsx @@ -57,12 +57,12 @@ export class FieldView extends React.Component<FieldViewProps> { } render() { const field = this.field; - if (!field) { + if (field === undefined) { return <p>{'<null>'}</p>; } - if (typeof field === "string") { - return <p>{field}</p>; - } + // if (typeof field === "string") { + // return <p>{field}</p>; + // } else if (field instanceof RichTextField) { return <FormattedTextBox {...this.props} />; } @@ -108,9 +108,6 @@ export class FieldView extends React.Component<FieldViewProps> { // else if (field instanceof HtmlField) { // return <WebBox {...this.props} /> // } - else if (typeof field === "number") { - return <p>{field}</p>; - } else if (!(field instanceof Promise)) { return <p>{JSON.stringify(field)}</p>; } |