Have a break at specific trials using online experiment

OS (Mac OS 10.13.6):
PsychoPy version (v3.00b11):
Standard Standalone? (y/n) If not then what?: yes

What are you trying to achieve?:

Hi everyone. I want try to set a break at certain number trials(e.g. 40). In the local experiment, i add a python code if formal_trials.thisN != 40: continueRoutine=False, it works properly. I translated the code to JS code if (formal_trials.thisN == 40) {continueRoutine = false; }
It can not work properly. How to translated if formal_trials.thisN != 40 to JS code.

Could anyone can give some suggest? Thank you so much!

I have tested and found that continueRoutine = false did not work in online experiments, even the if condition was true. Has anyone encountered the same problem?