How to get space bar to end routine only after rating is collected

This was a problem with the slider rating equality check with ‘undefined’. Turns out getRating() returns an actual undefined type, rather than a string of ‘undefined’. So change:

if (thisSlider.getRating() !== undefined) { // so equality check is with an undefined type, not string

Here is a working example if that fails sliderCode.psyexp (6.2 KB)

1 Like