VERY bizarre behaviour - when letter N or Y is selected in EXP info dialogue box

When the Exp Info dialogue box appears and info input accordingly. If a participant uses the letter N or Y anywhere in that dialogue box, it causes the practice trial i run to run twice. It seems following the practice trial where the choice is to continue (Y) or redo the practice (N) it is automatically redoing it and running through the practice twice if either of the allowed keys are selected in the EXP info box, the second loop does not have this issue. I have tested it with the letter N and Y in the exp Info and not in the Exp Info and it only happens when N and Y is used there. Any ideas? Please…

below is the code that is used to continue (or not). It is in the each frame tab of the code component

var _pj;
function _pj_snippets(container) {
function in_es6(left, right) {
if (((right instanceof Array) || ((typeof right) === “string”))) {
return (right.indexOf(left) > (- 1));
} else {
if (((right instanceof Map) || (right instanceof Set) || (right instanceof WeakMap) || (right instanceof WeakSet))) {
return right.has(left);
} else {
return (left in right);
}
}
}
container[“in_es6”] = in_es6;
return container;
}
_pj = {};
_pj_snippets(_pj);
response = psychoJS.eventManager.getKeys();
if (_pj.in_es6(“n”, response)) {
continueRoutine = false;
} else {
if (_pj.in_es6(“y”, response)) {
continueRoutine = false;
trials.finished = true;
}
}