diff options
author | anika <anika.ahluwalia@gmail.com> | 2021-01-27 20:35:50 -0500 |
---|---|---|
committer | anika <anika.ahluwalia@gmail.com> | 2021-01-27 20:35:50 -0500 |
commit | 8a44fab7131c713937d92c2ac29265d4e2bd54d5 (patch) | |
tree | 74e24dddb475feb05a3dc71b1c10a9a56b65c623 /src/client/views/nodes/LabelBox.tsx | |
parent | 7941773a61573db14cbf425d07ab0ff9b8ce5d33 (diff) | |
parent | e3db0536ad0086a328ee353be1c4dfd34ba03e02 (diff) |
Merge branch 'filters' of https://github.com/browngraphicslab/Dash-Web into filters
Diffstat (limited to 'src/client/views/nodes/LabelBox.tsx')
-rw-r--r-- | src/client/views/nodes/LabelBox.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/nodes/LabelBox.tsx b/src/client/views/nodes/LabelBox.tsx index 3448a4abd..87d5b07a2 100644 --- a/src/client/views/nodes/LabelBox.tsx +++ b/src/client/views/nodes/LabelBox.tsx @@ -67,7 +67,7 @@ export class LabelBox extends ViewBoxBaseComponent<FieldViewProps, LabelDocument const params = Cast(this.paramsDoc["onClick-paramFieldKeys"], listSpec("string"), []); const missingParams = params?.filter(p => !this.paramsDoc[p]); params?.map(p => DocListCast(this.paramsDoc[p])); // bcz: really hacky form of prefetching ... - const label = StrCast(this.rootDoc[this.fieldKey], StrCast(this.rootDoc.title)); + const label = typeof this.rootDoc[this.fieldKey] === "string" ? StrCast(this.rootDoc[this.fieldKey]) : StrCast(this.rootDoc.title); return ( <div className="labelBox-outerDiv" onClick={action(() => this.clicked = !this.clicked)} |