From 79806fd5357f64839c5fc098671f587b1cdbf18f Mon Sep 17 00:00:00 2001 From: Molly Smith Date: Thu, 22 Aug 2024 13:22:48 -0600 Subject: [PATCH] Fixed scalar map bug discovered by automated tests --- .../mats-common/imports/startup/server/data_query_util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meteor_packages/mats-common/imports/startup/server/data_query_util.js b/meteor_packages/mats-common/imports/startup/server/data_query_util.js index a23317d94..c4682d4a3 100644 --- a/meteor_packages/mats-common/imports/startup/server/data_query_util.js +++ b/meteor_packages/mats-common/imports/startup/server/data_query_util.js @@ -1897,7 +1897,7 @@ const parseQueryDataMapScalar = function ( return Number(a) - Number(b); }); const limitType = plotParams["map-range-controls"]; - if (limitType === "Default range") { + if (limitType === undefined || limitType === "Default range") { highLimit = filteredValues[Math.floor(filteredValues.length * 0.98)]; lowLimit = filteredValues[Math.floor(filteredValues.length * 0.02)]; } else {