aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionTreeView.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-05-02 16:58:14 -0400
committerbob <bcz@cs.brown.edu>2019-05-02 16:58:14 -0400
commitac9b42dba420139c0a7fad5685425b3cf9c1570e (patch)
tree1d8689365bb8971f1dfc026f92b470c6673421e5 /src/client/views/collections/CollectionTreeView.tsx
parenta78282cdf7fbb99386484640e1fb89d4b9b0cbee (diff)
clean up
Diffstat (limited to 'src/client/views/collections/CollectionTreeView.tsx')
-rw-r--r--src/client/views/collections/CollectionTreeView.tsx11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx
index 2cef1462b..b67d6f965 100644
--- a/src/client/views/collections/CollectionTreeView.tsx
+++ b/src/client/views/collections/CollectionTreeView.tsx
@@ -145,11 +145,8 @@ class TreeView extends React.Component<TreeViewProps> {
</div>;
}
public static GetChildElements(docs: Doc[], remove: ((doc: Doc) => void), move: DragManager.MoveFunction, dropAction: dropActionType) {
- return docs.filter(child => !child.excludeFromLibrary).filter(doc => FieldValue(doc)).map(child => {
- console.log("child = " + child[Id]);
- return <TreeView document={child} key={child[Id]} deleteDoc={remove} moveDocument={move} dropAction={dropAction} />
- }
- );
+ return docs.filter(child => !child.excludeFromLibrary).filter(doc => FieldValue(doc)).map(child =>
+ <TreeView document={child} key={child[Id]} deleteDoc={remove} moveDocument={move} dropAction={dropAction} />);
}
}
@@ -177,9 +174,7 @@ export class CollectionTreeView extends CollectionSubView(Document) {
if (!children) {
return (null);
}
- let testForLibrary = children && children.length === 1 && children[0] === CurrentUserUtils.UserDocument;
- var subchildren = testForLibrary ? Cast(children[0].data, listSpec(Doc), children) : children;
- let childElements = TreeView.GetChildElements(subchildren, this.remove, this.props.moveDocument, dropAction);
+ let childElements = TreeView.GetChildElements(children, this.remove, this.props.moveDocument, dropAction);
return (
<div id="body" className="collectionTreeView-dropTarget"