diff options
| author | bob <bcz@cs.brown.edu> | 2019-01-29 14:43:42 -0500 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-01-29 14:43:42 -0500 |
| commit | d8ff5b1effe0db563defc2a6e1391b9b0d160e67 (patch) | |
| tree | 7f34bcd53a5732d644ccb8749da5d9258359d5b5 /src/views/collections/CollectionDockingView.tsx | |
| parent | 0a1264837da6de1bd73637307cc9c52678efa20f (diff) | |
intermediate state -- things don't resize properly yet.
Diffstat (limited to 'src/views/collections/CollectionDockingView.tsx')
| -rw-r--r-- | src/views/collections/CollectionDockingView.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/views/collections/CollectionDockingView.tsx b/src/views/collections/CollectionDockingView.tsx index b6fff6ba0..a59a40b33 100644 --- a/src/views/collections/CollectionDockingView.tsx +++ b/src/views/collections/CollectionDockingView.tsx @@ -132,13 +132,13 @@ export class CollectionDockingView extends React.Component<CollectionViewProps> console.log("Gettting " + component); const { fieldKey, Document: Document } = this.props; const value: Document[] = Document.GetFieldValue(fieldKey, ListField, []); - if (component === "doc1") { + if (component === "doc1" && value.length > 0) { return (<DocumentView key={value[ 0 ].Id} ContainingCollectionView={this} Document={value[ 0 ]} ContainingDocumentView={this.props.ContainingDocumentView} />); } - if (component === "doc2") { + if (component === "doc2" && value.length > 1) { return (<DocumentView key={value[ 1 ].Id} ContainingCollectionView={this} Document={value[ 1 ]} ContainingDocumentView={this.props.ContainingDocumentView} />); } - if (component === "doc3") { + if (component === "doc3" && value.length > 2) { return (<DocumentView key={value[ 2 ].Id} ContainingCollectionView={this} Document={value[ 2 ]} ContainingDocumentView={this.props.ContainingDocumentView} />); } if (component === "text") { |
