lookit / ember-lookit-frameplayer

Ember app with experiment frames and a frame player to run browser-based experiments
MIT License
5 stars 20 forks source link

generateProperties produces a 'condition not defined' error #326

Open becky-gilbert opened 1 year ago

becky-gilbert commented 1 year ago

Possible bug: the study hangs on the frame below because generateProperties code produces a condition not defined error.

Code:

"remember-my-condition": {
  "kind": "exp-lookit-text",
  "generateProperties": "function(expData, sequence, child, pastSessions, conditions) {var conditions = expData['3-condition-text-trials'].conditions;if (conditions['conditionNum'] == 0) {console.log('condition 1');} else  {console.log('condition 2');}}",
  "blocks":[{"text":"some text"}]
}

See here for description: https://github.com/lookit/lookit-api/issues/1139#issuecomment-1476829207

See Conditions and Logic study on staging for an example.