Skip to main content
aen-infloww
May 18, 2024
Question

How to setProperties only on certain instances in a set?

I’m doing a Instances.forEach((i) => { i.setProperties({"signal": "red"}) }) but the problem is not all is not all instances in Instances has the property signal, so when it encounters such an instance, it breaks with an error like blah blah does not exist.

How to I do a if (i.propertyExists("signal") { i.setProperties({"signal": "red"}) }?

This topic has been closed for replies.

1 reply

tank666
May 18, 2024
UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank