diff --git a/packages/core/lib/get-item.ts b/packages/core/lib/get-item.ts index d24629c37d..3fa30ec5a3 100644 --- a/packages/core/lib/get-item.ts +++ b/packages/core/lib/get-item.ts @@ -15,12 +15,16 @@ export const getItem = ( if (!selector.zone || selector.zone === rootDroppableId) { const item = data.content[selector.index]; - return { ...item, props: dynamicProps[item.props.id] || item.props }; + return item?.props + ? { ...item, props: dynamicProps[item.props.id] || item.props } + : undefined; } const item = setupZone(data, selector.zone).zones[selector.zone][ selector.index ]; - return { ...item, props: dynamicProps[item.props.id] || item.props }; + return item?.props + ? { ...item, props: dynamicProps[item.props.id] || item.props } + : undefined; };