Files
penpot/frontend
Andrey Antukh 577f00dd24 🐛 Fix error when get-parent-with-data encounters non-Element nodes
The get-parent-with-data function traverses the DOM using parentElement
to find an ancestor with a specific data-* attribute. When the current
node is a non-Element DOM node (e.g. Document node reached from event
handlers on window), accessing .-dataset returns undefined, causing
obj/in? to throw "right-hand side of 'in' should be an object".

This adds a nodeType check to skip non-Element nodes during traversal
and continue up the parent chain.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
2026-03-23 19:19:27 +00:00
..
2026-01-22 13:55:41 +01:00
2026-02-26 12:19:15 +01:00
2026-02-13 13:17:08 +01:00
2026-02-24 00:07:30 +01:00
2026-02-10 08:29:24 +01:00