Shopify / draggable

The JavaScript Drag & Drop library your grandparents warned you about.
https://shopify.github.io/draggable
MIT License
18k stars 1.09k forks source link

Handle case when element is undefined #596

Open arpowers opened 11 months ago

arpowers commented 11 months ago

This PR implements or fixes...

This prevents an error in a case when dragging elements to an empty container. In those cases, the element ends up being undefined throwing an error. I thought the easiest way to fix would be just using optional chaining.

Screenshot 2023-12-14 at 5 12 08 PM

Does this PR require the Docs to be updated?

No

Does this PR require new tests?

No

This branch been tested on... (click all that apply / add new items)

Browsers: