mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-11 16:18:11 +00:00
Patching for issue #989
Fixing inappropriate looping technique that throws error when attributing default parameters.
This commit is contained in:
parent
2cbd571a18
commit
934f183b96
@ -922,7 +922,7 @@ window.jsPsych = (function() {
|
||||
if(jsPsych.plugins[trial.type].info.parameters[param].type == jsPsych.plugins.parameterType.COMPLEX){
|
||||
if(jsPsych.plugins[trial.type].info.parameters[param].array == true){
|
||||
// iterate over each entry in the array
|
||||
for(var i in trial[param]){
|
||||
trial[param].forEach(function(ip, i){
|
||||
// check each parameter in the plugin description
|
||||
for(var p in jsPsych.plugins[trial.type].info.parameters[param].nested){
|
||||
if(typeof trial[param][i][p] == 'undefined' || trial[param][i][p] === null){
|
||||
@ -933,7 +933,7 @@ window.jsPsych = (function() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// if it's not nested, checking is much easier and do that here:
|
||||
|
Loading…
Reference in New Issue
Block a user