diff options
| author | andrewdkim <adkim414@gmail.com> | 2019-09-28 14:58:17 -0400 |
|---|---|---|
| committer | andrewdkim <adkim414@gmail.com> | 2019-09-28 14:58:17 -0400 |
| commit | 19178bad14cda27aa36932f500ec06d684b843ef (patch) | |
| tree | 6d7538358b730068cfa7848bbb7c6f05b06d314b /src/client/views/collections/CollectionSchemaView.tsx | |
| parent | bf8907cfc3e005f2ce6756820d9b3f9de35f1807 (diff) | |
| parent | a80f0867032a4735b319c87c1c7c045f062a7d4f (diff) | |
merge from master
Diffstat (limited to 'src/client/views/collections/CollectionSchemaView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionSchemaView.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 7bd2a1971..8d931f812 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -246,7 +246,7 @@ export interface SchemaTableProps { PanelHeight: () => number; PanelWidth: () => number; childDocs?: Doc[]; - CollectionView: CollectionView | CollectionPDFView | CollectionVideoView; + CollectionView: Opt<CollectionView | CollectionPDFView | CollectionVideoView>; ContainingCollectionView: Opt<CollectionView | CollectionPDFView | CollectionVideoView>; ContainingCollectionDoc: Opt<Doc>; fieldKey: string; @@ -804,7 +804,7 @@ export class SchemaTable extends React.Component<SchemaTableProps> { csv.substring(0, csv.length - 1); let dbName = StrCast(this.props.Document.title); let res = await Gateway.Instance.PostSchema(csv, dbName); - if (self.props.CollectionView.props.addDocument) { + if (self.props.CollectionView && self.props.CollectionView.props.addDocument) { let schemaDoc = await Docs.Create.DBDocument("https://www.cs.brown.edu/" + dbName, { title: dbName }, { dbDoc: self.props.Document }); if (schemaDoc) { //self.props.CollectionView.props.addDocument(schemaDoc, false); |
