diff --git a/public/js/appChart.js b/public/js/appChart.js index 322e88b47a9c634285ef7a1ceea3810c092347bc..fe5aade993914f1cbd4e6f095002c494bc7deb15 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;