Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
the line break for the mapping broke the main experiment
  • Loading branch information
teonbrooks committed May 18, 2020
1 parent 0c4ccca commit 08bf5c1
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions app/utils/labjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ class ExperimentWindow extends Component {
case 'Faces and Houses':
faceshouses.parameters = props.settings.params;
faceshouses.parameters.title = props.settings.title;
faceshouses.files = props.settings.params.stimuli
.map((image) => ({
[`${image.dir}/${image.filename}`]: `${image.dir}/${image.filename}`,
}))
.reduce((obj, item) => {
obj[Object.keys(item)[0]] = Object.values(item)[0];
faceshouses.files = props.settings.params.stimuli.map(image => (
{ [`${image.dir}/${image.filename}`] : `${image.dir}/${image.filename}`}
)).reduce((obj, item) => {
obj[Object.keys(item)[0]] = Object.values(item)[0]
return obj;
}, {});
this.study = lab.util.fromObject(clonedeep(faceshouses), lab);
Expand All @@ -45,12 +43,10 @@ class ExperimentWindow extends Component {
default:
custom.parameters = props.settings.params;
custom.parameters.title = props.settings.title;
custom.files = props.settings.params.stimuli
.map((image) => ({
[`${image.dir}/${image.filename}`]: `${image.dir}/${image.filename}`,
}))
.reduce((obj, item) => {
obj[Object.keys(item)[0]] = Object.values(item)[0];
custom.files = props.settings.params.stimuli.map(image => (
{ [`${image.dir}/${image.filename}`] : `${image.dir}/${image.filename}`}
)).reduce((obj, item) => {
obj[Object.keys(item)[0]] = Object.values(item)[0]
return obj;
}, {});
this.study = lab.util.fromObject(clonedeep(custom), lab);
Expand Down

0 comments on commit 08bf5c1

Please sign in to comment.