From b6283370fe95e159f5574ec1bd4dda3687d4ca6c Mon Sep 17 00:00:00 2001 From: Becky Gilbert Date: Tue, 15 Oct 2024 13:42:03 -0700 Subject: [PATCH] bring back anonymous fn (need arrow fn for correct scope) --- packages/record/src/consentVideo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/record/src/consentVideo.ts b/packages/record/src/consentVideo.ts index 06c3a245..3d1e2c9b 100644 --- a/packages/record/src/consentVideo.ts +++ b/packages/record/src/consentVideo.ts @@ -280,7 +280,7 @@ export class VideoConsentPlugin implements JsPsychPlugin { */ private nextButton(display: HTMLElement) { const next = this.getButton(display, "next"); - next.addEventListener("click", this.endTrial); + next.addEventListener("click", () => this.endTrial()); } /**