From 4eb39ffedc17133aea094c9a67402344e366fa7e Mon Sep 17 00:00:00 2001 From: Chris Villa Date: Fri, 27 Dec 2024 16:56:25 +0000 Subject: [PATCH] refactor: check if dnd item exists before accessing data --- .../core/components/DragDropContext/NestedDroppablePlugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/components/DragDropContext/NestedDroppablePlugin.ts b/packages/core/components/DragDropContext/NestedDroppablePlugin.ts index 384673ca6d..4fca87151a 100644 --- a/packages/core/components/DragDropContext/NestedDroppablePlugin.ts +++ b/packages/core/components/DragDropContext/NestedDroppablePlugin.ts @@ -183,7 +183,7 @@ export const findDeepestCandidate = ( filteredCandidates.reverse(); const zone = getZoneId(filteredCandidates[0]); - const area = filteredCandidates[0].data.areaId || null; + const area = filteredCandidates[0]?.data.areaId; return { zone, area }; }