Closed sindreij closed 1 year ago
Hi. In https://github.com/thisbeyond/solid-dnd/blob/1060f8d3bb29e967fff1f62d3b8de4f8ea882e76/src/create-pointer-sensor.ts#L28, attach is used before it is defined. It's defined on line 42. This is only an issue when onMount is called synchronously. For me that happens in tests (using vitest and @solidjs/testing-library). I think this could be solved by moving onMount and onCleanup below the definition of attach.
attach
onMount
onCleanup
If you want to, I could create a reproduction and/or a pull-request. Please let me know how you want me to proceed.
Interesting. I imagine this is common across solidjs so I wonder if better to tackle holistically in the solid testing library?
Hi. In https://github.com/thisbeyond/solid-dnd/blob/1060f8d3bb29e967fff1f62d3b8de4f8ea882e76/src/create-pointer-sensor.ts#L28,
attach
is used before it is defined. It's defined on line 42. This is only an issue when onMount is called synchronously. For me that happens in tests (using vitest and @solidjs/testing-library). I think this could be solved by movingonMount
andonCleanup
below the definition ofattach
.If you want to, I could create a reproduction and/or a pull-request. Please let me know how you want me to proceed.