Skip to content
Snippets Groups Projects
Verified Commit e072cb39 authored by Owen Graham's avatar Owen Graham
Browse files

Remove `allParams()` check

parent c1230c38
Branches
No related tags found
No related merge requests found
......@@ -56,9 +56,6 @@ function indexVisualize() {
year: selectVal('year'),
measurement: selectVal('measurement'),
};
if (!allParams(params)) {
return;
}
setSources(sourceLink(params.station, params.year));
visualize(`${SCRIPT_ROOT}/plot`, params);
}
......@@ -71,9 +68,6 @@ function overlayVisualize() {
year2: selectVal('year-2'),
measurement: selectVal('measurement'),
};
if (!allParams(params)) {
return;
}
setSources(sourceLink(params.station1, params.year1, 1),
sourceLink(params.station2, params.year2, 2));
visualize(`${SCRIPT_ROOT}/plot/overlay`, params);
......@@ -86,9 +80,6 @@ function boxplotVisualize() {
year2: selectVal('year-2'),
measurement: selectVal('measurement'),
};
if (!allParams(params)) {
return;
}
setSources(sourceLink(params.station, params.year1));
// XXX No year 2?
visualize(`${SCRIPT_ROOT}/plot/boxplot`, params);
......@@ -134,18 +125,6 @@ function setSources(...sources) {
sourceDiv.replaceChildren(...sources);
}
/**
* Check whether all properties are truthy.
*/
function allParams(params) {
for (const key in params) {
if (!params[key]) {
return false;
}
}
return true;
}
/**
* Generate a query string from parameters.
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment