primereact icon indicating copy to clipboard operation
primereact copied to clipboard

Tree_Drag and Drop: validateDropPoint function is throwing error

Open rinnuagna opened this issue 1 year ago • 3 comments

Describe the bug

I am dragging some values and dropping it inside a primereact tree. It is throwing an error from tree.esm.js:1212 i.e Uncaught TypeError: Cannot read properties of null (reading 'path') error at validateDropPoint This was a previously working functionality

Reproducer

No response

PrimeReact version

10.3.2

React version

17.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

All browsers

Steps to reproduce the behavior

No response

Expected behavior

No response

rinnuagna avatar Feb 27 '24 15:02 rinnuagna

at least lines 110 and 213 should take care that dragState.current might be null or undefined then use dragState.current**?**.path

arnodemer avatar Feb 28 '24 10:02 arnodemer

Feel free to submit a PR @arnodemer you can run npm run dev to test the code using the showcase.

melloware avatar Feb 28 '24 12:02 melloware