mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 19:20:55 +00:00
use clearer error message when rows and columns both null
This commit is contained in:
parent
11e0103678
commit
808e835306
@ -159,7 +159,7 @@ class AudioButtonResponsePlugin implements JsPsychPlugin<Info> {
|
||||
buttonGroupElement.classList.add("jspsych-btn-group-grid");
|
||||
if (trial.grid_rows === null && trial.grid_columns === null) {
|
||||
throw new Error(
|
||||
"You must specify the number of rows or columns when using the grid layout."
|
||||
"You cannot set `grid_rows` to `null` without providing a value for `grid_columns`."
|
||||
);
|
||||
}
|
||||
const n_cols =
|
||||
|
@ -119,7 +119,7 @@ class CanvasButtonResponsePlugin implements JsPsychPlugin<Info> {
|
||||
buttonGroupElement.classList.add("jspsych-btn-group-grid");
|
||||
if (trial.grid_rows === null && trial.grid_columns === null) {
|
||||
throw new Error(
|
||||
"You must specify the number of rows or columns when using the grid layout."
|
||||
"You cannot set `grid_rows` to `null` without providing a value for `grid_columns`."
|
||||
);
|
||||
}
|
||||
const n_cols =
|
||||
|
@ -105,7 +105,7 @@ class HtmlButtonResponsePlugin implements JsPsychPlugin<Info> {
|
||||
buttonGroupElement.classList.add("jspsych-btn-group-grid");
|
||||
if (trial.grid_rows === null && trial.grid_columns === null) {
|
||||
throw new Error(
|
||||
"You must specify the number of rows or columns when using the grid layout."
|
||||
"You cannot set `grid_rows` to `null` without providing a value for `grid_columns`."
|
||||
);
|
||||
}
|
||||
const n_cols =
|
||||
|
@ -200,7 +200,7 @@ class ImageButtonResponsePlugin implements JsPsychPlugin<Info> {
|
||||
buttonGroupElement.classList.add("jspsych-btn-group-grid");
|
||||
if (trial.grid_rows === null && trial.grid_columns === null) {
|
||||
throw new Error(
|
||||
"You must specify the number of rows or columns when using the grid layout."
|
||||
"You cannot set `grid_rows` to `null` without providing a value for `grid_columns`."
|
||||
);
|
||||
}
|
||||
const n_cols =
|
||||
|
@ -198,7 +198,7 @@ class VideoButtonResponsePlugin implements JsPsychPlugin<Info> {
|
||||
buttonGroupElement.classList.add("jspsych-btn-group-grid");
|
||||
if (trial.grid_rows === null && trial.grid_columns === null) {
|
||||
throw new Error(
|
||||
"You must specify the number of rows or columns when using the grid layout."
|
||||
"You cannot set `grid_rows` to `null` without providing a value for `grid_columns`."
|
||||
);
|
||||
}
|
||||
const n_cols =
|
||||
|
Loading…
Reference in New Issue
Block a user