It just returns false when there is no element or it's hidden. Everything is working now but on my side. I'm not sure that this is the right fix. I will try to reproduce the problem on codepen when I have more time if you are not aware of this behavior.
Draggable throwing error when can't find the element
in GSAP
Posted
Draggable.hitTest() trhows and error when it can't find the element:
I found the line with _unwrapElement(e).getBoundingClientRect() in Draggable.js and fix it like that:
It just returns false when there is no element or it's hidden. Everything is working now but on my side. I'm not sure that this is the right fix. I will try to reproduce the problem on codepen when I have more time if you are not aware of this behavior.