diff options
| author | bobzel <zzzman@gmail.com> | 2023-05-10 11:14:57 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-05-10 11:14:57 -0400 |
| commit | 53273651cc8ed0f9e073fa30590e0bb172e492e8 (patch) | |
| tree | f6b1fd36f99bfa951b99da8ab0e8c70560b031b5 /src/client/util/Import & Export/DirectoryImportBox.tsx | |
| parent | abcf1167340f9f411e7712d11f2110625b0938d8 (diff) | |
| parent | 97a743455e7fa3eee768b1d4d025b9dedc49f370 (diff) | |
Merge branch 'master' into collaboration-sarah
Diffstat (limited to 'src/client/util/Import & Export/DirectoryImportBox.tsx')
| -rw-r--r-- | src/client/util/Import & Export/DirectoryImportBox.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/util/Import & Export/DirectoryImportBox.tsx b/src/client/util/Import & Export/DirectoryImportBox.tsx index 559958c2b..b9bb22564 100644 --- a/src/client/util/Import & Export/DirectoryImportBox.tsx +++ b/src/client/util/Import & Export/DirectoryImportBox.tsx @@ -14,12 +14,14 @@ import { AcceptableMedia, Upload } from '../../../server/SharedMediaTypes'; import { Utils } from '../../../Utils'; import { GooglePhotos } from '../../apis/google_docs/GooglePhotosClientUtils'; import { Docs, DocumentOptions, DocUtils } from '../../documents/Documents'; +import { DocumentType } from '../../documents/DocumentTypes'; import { Networking } from '../../Network'; import { FieldView, FieldViewProps } from '../../views/nodes/FieldView'; import { DocumentManager } from '../DocumentManager'; import './DirectoryImportBox.scss'; import ImportMetadataEntry, { keyPlaceholder, valuePlaceholder } from './ImportMetadataEntry'; import React = require('react'); +import _ = require('lodash'); const unsupported = ['text/html', 'text/plain']; @@ -155,8 +157,8 @@ export class DirectoryImportBox extends React.Component<FieldViewProps> { x: NumCast(doc.x), y: NumCast(doc.y) + offset, }; - const parent = this.props.ContainingCollectionView; - if (parent) { + const parent = this.props.DocumentView?.().props.docViewPath().lastElement(); + if (parent?.rootDoc.type === DocumentType.COL) { let importContainer: Doc; if (docs.length < 50) { importContainer = Docs.Create.MasonryDocument(docs, options); |
