Skip to content

Commit

Permalink
modify on_finish logic to throw error if both sequence and data are e…
Browse files Browse the repository at this point in the history
…mpty
  • Loading branch information
becky-gilbert committed Nov 6, 2024
1 parent c68f8a5 commit 36d971d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/lookit-initjspsych/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const on_finish = (

const exp_data: JsPsychExpData[] = data.values();

if (!sequence || sequence.length === 0 || exp_data.length === 0) {
if (!sequence || (sequence.length === 0 && exp_data.length === 0)) {
throw new SequenceExpDataError();
}

Expand Down

0 comments on commit 36d971d

Please sign in to comment.