[Bug] `dropTargets` is empty in `location.current` on edge cases

Author: crabvkCreated Nov 25, 2025Updated Nov 25, 2025

Hi. Thank you for the great library. Here's one bug I found: I took the List example from the examples page and have added margin to the containerStyles object and the call to alert when target is not in the array to demonstrate the issue:

typescript
return monitorForElements({
      onDrop({ location, source }) {
        const target = location.current.dropTargets[0];
        if (!target) {
          alert("Here is the issue!"); // <=== Added this.
          return;
        }
// ...

Here's my demo:

https://github.com/user-attachments/assets/f439c997-034e-4d1d-b187-d2b69882f871

Source: atlassian/pragmatic-drag-and-drop