From 1f6faf336c2127ffcb1c366b83ed6224c7214140 Mon Sep 17 00:00:00 2001 From: Bankminer78 Date: Mon, 8 Jul 2024 16:43:40 -0400 Subject: [PATCH] Edited ExtensionManager.ts to handle multiple extension types and versions --- packages/jspsych/src/ExtensionManager.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/jspsych/src/ExtensionManager.ts b/packages/jspsych/src/ExtensionManager.ts index 02ce60d2fc..75802759d2 100644 --- a/packages/jspsych/src/ExtensionManager.ts +++ b/packages/jspsych/src/ExtensionManager.ts @@ -67,6 +67,15 @@ export class ExtensionManager { ) ); + const extensionInfo = trialExtensionsConfiguration.length + ? { + extension_type: results.map((result) => result.extension_type), + extension_version: results.map((result) => result.extension_version), + } + : {}; + + results.push(extensionInfo); + return Object.assign({}, ...results); } }