QUEST loop not terminating online

Hi

I’m encountering a problem with a QUEST staircase on Pavlovia. The experiment was created with Builder and runs fine, but the staircase does not terminate after the specified number of trials when I run it online.
Here is the loop specification:


I report each trial to the console so I can see the intensity values and trial number. They always go over the nReps (50) and the staircase doesn’t terminate. I have to force quit the experiment.
Am I missing something here?!
Thanks.

Answering my own question here :joy:… but it might be useful for others. Found a solution by @alyd in their post here:

Basically you need to pass an additional parameter (maxTrials) to the stair handler. You can edit the js file directly or add it via the Builder as shown below, although doing it this way will give an error if you try and run it locally.