mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-11 16:18:11 +00:00
add error message when timeline is empty throw a useful error message when the timeline is empty #853
This commit is contained in:
parent
94d4403be6
commit
de175d5d52
@ -57,6 +57,10 @@ window.jsPsych = (function() {
|
||||
console.error('No timeline declared in jsPsych.init. Cannot start experiment.')
|
||||
}
|
||||
|
||||
if(options.timeline.length == 0){
|
||||
console.error('No trials have been added to the timeline (the timeline is an empty array). Cannot start experiment.')
|
||||
}
|
||||
|
||||
// reset variables
|
||||
timeline = null;
|
||||
global_trial_index = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user