aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/Import & Export/DirectoryImportBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-04-14 11:12:49 -0400
committerbobzel <zzzman@gmail.com>2023-04-14 11:12:49 -0400
commit650cc00d18c97f89aef77f50703aa9b525dd0368 (patch)
tree1c0efe901e15bb83fdba045f8f179676b2185dbe /src/client/util/Import & Export/DirectoryImportBox.tsx
parent5cd64622f14ede408d3baca4a10d155b60392e46 (diff)
got rid of CollectionView prop. fixed DocFocusOrOpen to toggle targets and zoom correctly.
Diffstat (limited to 'src/client/util/Import & Export/DirectoryImportBox.tsx')
-rw-r--r--src/client/util/Import & Export/DirectoryImportBox.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/util/Import & Export/DirectoryImportBox.tsx b/src/client/util/Import & Export/DirectoryImportBox.tsx
index 76b1323c4..b9bb22564 100644
--- a/src/client/util/Import & Export/DirectoryImportBox.tsx
+++ b/src/client/util/Import & Export/DirectoryImportBox.tsx
@@ -157,7 +157,7 @@ export class DirectoryImportBox extends React.Component<FieldViewProps> {
x: NumCast(doc.x),
y: NumCast(doc.y) + offset,
};
- const parent = _.nth(this.props.docViewPath(), -2); // last element of path is this box's document view, 2nd to last is any collection or other document that may contain it.
+ const parent = this.props.DocumentView?.().props.docViewPath().lastElement();
if (parent?.rootDoc.type === DocumentType.COL) {
let importContainer: Doc;
if (docs.length < 50) {