From 1e9557c3c4fdbfb7c80bd09ec5d34e1b46492f86 Mon Sep 17 00:00:00 2001 From: Pithon Kabiro <pithon.kabiro@hft-stuttgart.de> Date: Fri, 22 Oct 2021 19:28:33 +0200 Subject: [PATCH] Edit function: callback function that draws chart Remove the logic that throws an error if there is a problem fetching metadata and observations. It is currently not working as expected --- public/js/appChart.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/public/js/appChart.js b/public/js/appChart.js index 322e88b..fe5aade 100644 --- a/public/js/appChart.js +++ b/public/js/appChart.js @@ -231,23 +231,6 @@ const drawChartUsingSelectedOptions = async function () { ) ); - // If there is an error in fetching metadata + observations (Case 1: raw observations) - // the returned array will have this structure: [[undefined, undefined], undefined] - // Note that the second element is not an array as we would expect but is a - // a single `undefined` value - if (typeof observationsRawPlusMetadataArr[0][0] === "undefined") { - throw new Error( - `There was a problem in fetching metadata and observations` - ); - } - - // If there is an error in fetching metadata + observations (Case 2: temperature difference, dT) - // a single `undefined` value instead of an array (as we would expect) will be returned - if (typeof observationsTempDiffPlusMetadataArr === "undefined") - throw new Error( - `There was a problem in calculating the temperature difference (dT).\nThis is most likely due to a problem in fetching metadata and observations` - ); - // Extract the combined arrays for observations and metadata / raw observations const [observationsRawNestedArr, metadataRawNestedArr] = observationsRawPlusMetadataArr; -- GitLab