Issues with JS generation for buttons

An experiment with buttons causes issues when we run the JS version in pavlovia, causing the error " * TypeError: Cannot set property numClicks of [object Object] which has only a getter".

We’ve tracked it down to a line where the code increments the click counter for the button, even if we change “Record clicks” to “None” in the builder. No matter what we do, the builder will always generate code with the increment in clicks, attributing the value to numClicks in the button object.

We could simply replace every single button for a clickable text with a mouse response, but these are also error-prone, so we’d like to know if this is a known error with a work-around.

What version of PsychoPy are you using?

I’m using 2022.1.4
Related to this, one of the older versions used to work fine as this is a method I’ve used before.
We checked in older experiments in gitlab and the problematic line is missing.