jsPsych icon indicating copy to clipboard operation
jsPsych copied to clipboard

preload plugin loads in background when array is not flat

Open jodeleeuw opened this issue 2 years ago • 0 comments

Haven't fully figured out the conditions for when this happens, but it seems like setting...

const preload_trial = {
  type: jsPsychPreload,
  images: [array_of_images, other_array_of_images]
}

... causes the preload to run in the background with the trial completing immediately. Instead, setting...

const preload_trial = {
  type: jsPsychPreload,
  images: array_of_images.concat(other_array_of_images)
}

... runs the trial as expected.

jodeleeuw avatar Jul 21 '22 14:07 jodeleeuw