[BUG] Figma 'ran to a problem' when applying action to conditionnal interraction

Hey!

I have 2 variants of a component, one with a black background and the other with a white background.
I want my component to switch background when clicked.
I create a variable Boolean (called ‘Pressed’) and set it to false.
I then add an interraction to my component:
On Drag → If Else → if ‘Pressed’ is False → Change to → and it crash.

i tried on different instances, it keep crashing.

I’m fairly new to Figma, did i do something wrong? Or did i find a bug?

I use variables for dark and light mode, have you considered setting up colour variables? Because then you can create two modes (thus 2 values for each colour variable), which you can switch between using an interaction. It also saves you a lot of time creating duplicates of components :smiley: