aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSchemaCells.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-08-13 21:34:58 -0400
committerbobzel <zzzman@gmail.com>2020-08-13 21:34:58 -0400
commit16e663f807c77c56e64c23689dfdb7000fb2d0e9 (patch)
treea218fb0415f2a85936ae867d4fd98b0f696bfb0e /src/client/views/collections/CollectionSchemaCells.tsx
parent4a2f2bd0b94a923e8cde1199bf9abfedd8dcde23 (diff)
fixed warnings.
Diffstat (limited to 'src/client/views/collections/CollectionSchemaCells.tsx')
-rw-r--r--src/client/views/collections/CollectionSchemaCells.tsx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx
index 9cdd3b082..20ce6b76d 100644
--- a/src/client/views/collections/CollectionSchemaCells.tsx
+++ b/src/client/views/collections/CollectionSchemaCells.tsx
@@ -81,9 +81,8 @@ export class CollectionSchemaCell extends React.Component<CellProps> {
console.log("mounted2");
const doc = Doc.GetProto(this.props.rowProps.original);
const aliasdoc = await SearchUtil.GetAliasesOfDocument(doc);
- let targetContext = undefined;
if (aliasdoc.length > 0) {
- targetContext = Cast(aliasdoc[0].context, Doc) as Doc;
+ const targetContext = Cast(aliasdoc[0].context, Doc) as Doc;
console.log(StrCast(targetContext.title));
runInAction(() => this.contents = StrCast(targetContext.title));
}
@@ -424,7 +423,7 @@ export class CollectionSchemaCell extends React.Component<CellProps> {
:
this.returnHighlights(() => {
console.log(props.fieldKey);
- let dateCheck: Date | undefined = this.props.rowProps.original[this.props.rowProps.column.id as string] instanceof DateField ? DateCast(this.props.rowProps.original[this.props.rowProps.column.id as string]).date : undefined;
+ const dateCheck: Date | undefined = this.props.rowProps.original[this.props.rowProps.column.id as string] instanceof DateField ? DateCast(this.props.rowProps.original[this.props.rowProps.column.id as string]).date : undefined;
if (dateCheck !== undefined) {
cfield = dateCheck.toLocaleString();
}