From 87b210112d822a32634420453d54726db0d35165 Mon Sep 17 00:00:00 2001 From: Josh de Leeuw Date: Tue, 26 Jan 2021 13:51:31 -0500 Subject: [PATCH] add on_timeline_finish when repetition happens --- jspsych.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jspsych.js b/jspsych.js index c72345f5..5caf450a 100755 --- a/jspsych.js +++ b/jspsych.js @@ -552,6 +552,10 @@ window.jsPsych = (function() { // if we're all done with the timeline_variables, then check to see if there are more repetitions else if (progress.current_repetition < timeline_parameters.repetitions - 1) { this.nextRepetiton(); + // check to see if there is an on_timeline_finish function + if (typeof timeline_parameters.on_timeline_finish !== 'undefined'){ + timeline_parameters.on_timeline_finish(); + } return this.advance(); }