aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionBaseView.tsx
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-05-09 20:29:04 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-05-09 20:29:04 -0400
commitac36276782f5abf62fca20b407f7602fbe40a680 (patch)
treeb5e94c05b7b7bead94dc9ce96d9adb76f305043f /src/client/views/collections/CollectionBaseView.tsx
parent7a7ac91adfa76ad1811fc6a985a99502367053ca (diff)
parent39fd912fd4cd33f30a943290295a59992b9868eb (diff)
Merge branch 'master' of github-tsch-brown:browngraphicslab/Dash-Web into new_search
Diffstat (limited to 'src/client/views/collections/CollectionBaseView.tsx')
-rw-r--r--src/client/views/collections/CollectionBaseView.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionBaseView.tsx b/src/client/views/collections/CollectionBaseView.tsx
index 14b92af48..2b1f7bb37 100644
--- a/src/client/views/collections/CollectionBaseView.tsx
+++ b/src/client/views/collections/CollectionBaseView.tsx
@@ -63,13 +63,13 @@ export class CollectionBaseView extends React.Component<CollectionViewProps> {
if (!(documentToAdd instanceof Doc)) {
return false;
}
- let data = Cast(documentToAdd.data, listSpec(Doc), []);
+ let data = Cast(documentToAdd.data, listSpec(Doc), []).filter(d => d).map(d => d as Doc);
for (const doc of data.filter(d => d instanceof Document)) {
if (this.createsCycle(doc, containerDocument)) {
return true;
}
}
- let annots = Cast(documentToAdd.annotations, listSpec(Doc), []);
+ let annots = Cast(documentToAdd.annotations, listSpec(Doc), []).filter(d => d).map(d => d as Doc);
for (const annot of annots) {
if (this.createsCycle(annot, containerDocument)) {
return true;