diff --git a/packages/core/client/src/schema-component/common/dnd-context/index.tsx b/packages/core/client/src/schema-component/common/dnd-context/index.tsx index c17f15a70..7ff6c772e 100644 --- a/packages/core/client/src/schema-component/common/dnd-context/index.tsx +++ b/packages/core/client/src/schema-component/common/dnd-context/index.tsx @@ -19,7 +19,7 @@ const useDragEnd = (props?: any) => { const breakRemoveOn = over?.data?.current?.breakRemoveOn; const wrapSchema = over?.data?.current?.wrapSchema; const onSuccess = over?.data?.current?.onSuccess; - const removeParentsIfNoChildren = over.data.current.removeParentsIfNoChildren ?? true; + const removeParentsIfNoChildren = over?.data?.current?.removeParentsIfNoChildren ?? true; if (!activeSchema || !overSchema) { props?.onDragEnd?.(event);