I was trying to find all text nodes using a given text style and sort them according to the pages they’re in. I was able to find the nodes using style.consumers and find the page name & ids for some of these styles with this custom function below:
However, for some of the text nodes, findPage() returns undefined instead. This is strange because:
- i can locate the text nodes in my Figma File
- the text nodes are all using local styles
- they aren’t children of any instances whose components are soft-deleted
Does anyone know why this is happening? If so, what would be a good solution/alternate approach?