Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
feat: 🎸 better way of assigning defaults for showmessage
Browse files Browse the repository at this point in the history
  • Loading branch information
Rashi1997 committed Feb 11, 2021
1 parent 0103ff2 commit 58a05c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trials/showMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ const { baseStimulus } = require("../lib/markup/stimuli");
module.exports = function (config, options) {
const defaults = {
responseType: "html_keyboard_response",
duration: options.responseType == "html_keyboard_response" ? 1000 : null,
duration: options.responseType == "html_button_response" ? null : 1000,
stimulus: "",
message: "",
onstart: false,
responseEndsTrial: false,
taskCode: 1,
numBlinks: 1,
buttons: options.responseType == "html_button_response" ? ["OK"] : null,
buttons: options.responseType == "html_keyboard_response" ? null : ["OK"],
};
const {
responseType,
Expand Down

0 comments on commit 58a05c0

Please sign in to comment.