Skip to content

Commit

Permalink
make sure unprocessed functions get preserved in trial obj
Browse files Browse the repository at this point in the history
related to issue #42
  • Loading branch information
jodeleeuw committed May 15, 2014
1 parent 55ebe2f commit ab6c105
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions jspsych.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,10 @@
}
}

if(process){
if(typeof trial[keys[i]] == "function"){
tmp[keys[i]] = trial[keys[i]].call();
} else {
tmp[keys[i]] = trial[keys[i]];
}
if(typeof trial[keys[i]] == "function" && process){
tmp[keys[i]] = trial[keys[i]].call();
} else {
tmp[keys[i]] = trial[keys[i]];
}

}
Expand Down

1 comment on commit ab6c105

@jodeleeuw
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually related to #43

Please sign in to comment.