aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionPileView.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections/CollectionPileView.tsx')
-rw-r--r--src/client/views/collections/CollectionPileView.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionPileView.tsx b/src/client/views/collections/CollectionPileView.tsx
index 2636b98e5..f054e7b7f 100644
--- a/src/client/views/collections/CollectionPileView.tsx
+++ b/src/client/views/collections/CollectionPileView.tsx
@@ -36,11 +36,11 @@ export class CollectionPileView extends CollectionSubView(doc => doc) {
<CollectionFreeFormView {...this.props} layoutEngine={this.layoutEngine}
addDocument={undoBatch((doc: Doc | Doc[]) => {
(doc instanceof Doc ? [doc] : doc).map((d) => DocUtils.iconify(d));
- return this.props.addDocument(doc);
+ return this.props.addDocument?.(doc) || false;
})}
moveDocument={undoBatch((doc: Doc | Doc[], targetCollection: Doc | undefined, addDoc: (doc: Doc | Doc[]) => boolean) => {
(doc instanceof Doc ? [doc] : doc).map(undoBatch((d) => Doc.deiconifyView(d)));
- return this.props.moveDocument(doc, targetCollection, addDoc);
+ return this.props.moveDocument?.(doc, targetCollection, addDoc) || false;
})} />
</div>;
}
@@ -91,7 +91,7 @@ export class CollectionPileView extends CollectionSubView(doc => doc) {
const doc = this.childDocs[0];
doc.x = e.clientX;
doc.y = e.clientY;
- this.props.addDocTab(doc, "inParent") && this.props.removeDocument(doc);
+ this.props.addDocTab(doc, "inParent") && (this.props.removeDocument?.(doc) || false);
dist = 0;
}
}