fix: issue-2974 reparent nested document when dropped on current collection (#2975)

This commit is contained in:
Charlie Jonas
2022-01-24 20:40:42 -07:00
committed by GitHub
parent c8a67c374f
commit 36ee42084c

View File

@@ -81,7 +81,12 @@ function CollectionLink({
const { id, collectionId } = item;
if (monitor.didDrop()) return;
if (!collection) return;
if (collection.id === collectionId) return;
const document = documents.get(id);
if (collection.id === collectionId && !document?.parentDocumentId) {
return;
}
const prevCollection = collections.get(collectionId);
if (