fix: removed incorrectly calling childWhitelist hook logic during drag and drop (#1141)

This commit is contained in:
刘菊萍(絮黎) 2022-10-18 17:49:22 +08:00 committed by GitHub
parent 86b8889ec4
commit 6576346b91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1167,12 +1167,10 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp
return null;
}
const dropContainer = this.getDropContainer(e);
const childWhitelist = dropContainer?.container?.componentMeta?.childWhitelist;
const lockedNode = getClosestNode(dropContainer?.container as Node, (node) => node.isLocked);
if (lockedNode) return null;
if (
!dropContainer ||
(nodes && typeof childWhitelist === 'function' && !childWhitelist(operationalNodes[0]))
!dropContainer
) {
return null;
}