mirror of
https://github.com/penpot/penpot.git
synced 2026-05-04 15:49:34 +00:00
The shape API method .component() used locate-component which walks to the outermost instance root via get-instance-root. For nested component instances (e.g. a button inside a card), this incorrectly returned the outer component (the card) instead of the nearest one (the button). Added locate-head-component in utils.cljs which uses get-head-shape to find the nearest component head, and updated the :component property in shape.cljs to use it. Fixes #9183